A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://wxpython.org/Phoenix/docs/html/wx.adv.CommandLinkButton.html below:

wx.adv.CommandLinkButton — wxPython Phoenix 4.2.4a1 documentation

wx.adv.CommandLinkButton¶

Objects of this class are similar in appearance to the normal Buttons but are similar to the links in a web page in functionality.

Pressing such button usually results in switching to another window of the program and so they can be used as a replacement for the “Next” button in a multi-page dialog (such as wx.adv.Wizard), for example.

Their advantage compared to the ordinary Buttons is that they emphasize the action of switching the window and also that they allow to give more detailed explanation to the user because, in addition to the short button label, they also show a longer description string.

The short, title-like, part of the label is called the main label and the longer description is the note. Both of them can be set and queried independently using CommandLinkButton-specific methods such as SetMainLabel or GetNote or also via SetLabel and GetLabel methods inherited from wx.Button. When using the latter, the main label and the note are concatenated into a single string using a new line character between them (notice that the note part can have more new lines in it).

wx.adv.CommandLinkButton generates the same event as wx.Button but doesn’t support any of Button-specific styles nor adds any new styles of its own.

Currently this class uses native implementation under Windows Vista and later versions and a generic implementation for the other platforms and earlier Windows versions.

Added in version 2.9.2.

Class Hierarchy¶

Inheritance diagram for class

CommandLinkButton

:

Control Appearance¶ Methods Summary¶ Properties Summary¶ Class API¶
class wx.adv.CommandLinkButton(Button)¶

Possible constructors:

CommandLinkButton() -> None

CommandLinkButton(parent, id=ID_ANY, mainLabel='', note='',
                  pos=DefaultPosition, size=DefaultSize, style=0,
                  validator=DefaultValidator, name=ButtonNameStr) -> None

Objects of this class are similar in appearance to the normal Buttons but are similar to the links in a web page in functionality.


Methods¶
__init__(self, *args, **kw)¶

Overloaded Implementations:

__init__ (self)

Default constructor.

Use Create to really create the control.

Return type:

None

__init__ (self, parent, id=ID_ANY, mainLabel=’’, note=’’, pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=ButtonNameStr)

Constructor really creating a command Link button.

The button will be decorated with stock icons under GTK+ 2.

Parameters:
  • parent (wx.Window) – Parent window. Must not be None.

  • id (wx.WindowID) – Button identifier. A value of wx.ID_ANY indicates a default value.

  • mainLabel (string) – First line of text on the button, typically the label of an action that will be made when the button is pressed.

  • note (string) – Second line of text describing the action performed when the button is pressed.

  • pos (wx.Point) – Button position.

  • size (wx.Size) – Button size. If the default size is specified then the button is sized appropriately for the text.

  • style (long) – Window style. See wx.Button class description.

  • validator (wx.Validator) – Window validator.

  • name (string) – Window name.

Return type:

None



Create(self, parent, id=ID_ANY, mainLabel='', note='', pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=ButtonNameStr)¶

Button creation function for two-step creation.

For more details, see wx.adv.CommandLinkButton.

Parameters:
Return type:

bool


static GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)¶
Parameters:

variant (WindowVariant)

Return type:

VisualAttributes


GetLabel(self)¶

Returns the string label for the button.

Return type:

str

Returns:

A string with the main label and note concatenated together with a newline separating them.


GetMainLabel(self)¶

Returns the current main label.

Return type:

str

Returns:

Main label currently displayed.


GetNote(self)¶

Returns the currently used note.

Return type:

str

Returns:

Note currently displayed.


SetLabel(self, label)¶

Sets the string label and note for the button.

Parameters:

label (string) – The label and note to set, with the two separated by the first newline or none to set a blank note.

Return type:

None


SetMainLabel(self, mainLabel)¶

Changes the main label.

Parameters:

mainLabel (string) – New main label to use.

Return type:

None


SetMainLabelAndNote(self, mainLabel, note)¶

Sets a new main label and note for the button.

Neither of the arguments can be empty, if you need to change just the label or just the note, use SetMainLabel or SetNote instead of this function.

Parameters:
  • mainLabel (string) – New main label to use.

  • note (string) – New note to use.

Return type:

None


SetNote(self, note)¶

Changes the note.

Parameters:

note (string) – New note to use.

Return type:

None


Properties¶
Label¶

See GetLabel and SetLabel


MainLabel¶

See GetMainLabel and SetMainLabel


Note¶

See GetNote and SetNote


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4