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.SpinButton.html below:

wx.SpinButton — wxPython Phoenix 4.2.4a1 documentation

wx.SpinButton¶

A wx.SpinButton has two small up and down (or left and right) arrow buttons.

It is often used next to a text control for incrementing and decrementing a value. Portable programs should try to use wx.SpinCtrl instead as wx.SpinButton is not implemented for all platforms but wx.SpinCtrl is as it degenerates to a simple wx.TextCtrl on such platforms.

Window Styles¶

This class supports the following styles:

Events Emitted by this Class¶

Handlers bound for the following event types will receive a wx.SpinEvent parameter.

Note that if you handle both SPIN and wx.UP or wx.DOWN events, you will be notified about each of them twice: first the UP/DOWN event will be received and then, if it wasn’t vetoed, the SPIN event will be sent.

Note

the range supported by this control (and wx.SpinCtrl) depends on the platform but is at least -0x8000 to 0x7fff . Under GTK and Win32 with sufficiently new version of comctrl32.dll (at least 4.71 is required, 5.80 is recommended) the full 32 bit range is supported.

Class Hierarchy¶

Inheritance diagram for class

SpinButton

:

Control Appearance¶ Methods Summary¶ Properties Summary¶ Class API¶
class wx.SpinButton(Control)¶

Possible constructors:

SpinButton() -> None

SpinButton(parent, id=-1, pos=DefaultPosition, size=DefaultSize,
           style=SP_VERTICAL, name="spinButton") -> None

A SpinButton has two small up and down (or left and right) arrow buttons.


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

Overloaded Implementations:

__init__ (self)

Default constructor.

Return type:

None

__init__ (self, parent, id=-1, pos=DefaultPosition, size=DefaultSize, style=SP_VERTICAL, name=”spinButton”)

Constructor, creating and showing a spin button.

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

  • id (wx.WindowID) – Window identifier. The value wx.ID_ANY indicates a default value.

  • pos (wx.Point) – Window position. If wx.DefaultPosition is specified then a default position is chosen.

  • size (wx.Size) – Window size. If wx.DefaultSize is specified then a default size is chosen.

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

  • name (string) – Window name.

Return type:

None



Create(self, parent, id=-1, pos=DefaultPosition, size=DefaultSize, style=SP_VERTICAL, name='wxSpinButton')¶

Scrollbar creation function called by the spin button constructor.

See wx.SpinButton for details.

Parameters:
Return type:

bool


static GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)¶
Parameters:

variant (WindowVariant)

Return type:

wx.VisualAttributes


GetIncrement(self)¶

Get the value for increment for a spin control.

The default value is 1 but it can be changed using SetIncrement .

Return type:

int

Added in version 4.1/wxWidgets-3.1.6.


GetMax(self)¶

Returns the maximum permissible value.

Return type:

int


GetMin(self)¶

Returns the minimum permissible value.

Return type:

int


GetRange(self)¶

GetValue(self)¶

Returns the current spin button value.

Return type:

int


SetIncrement(self, value)¶

Sets the increment for the control.

The increment is the number by which the value changes when the up or down arrow is used.

The default is 1.

This function is currently implemented only in wxMSW and does nothing under the other platforms.

Parameters:

value (int)

Return type:

None

Added in version 4.1/wxWidgets-3.1.6.


SetMax(self, maxVal)¶

SetMin(self, minVal)¶

SetRange(self, min, max)¶

Sets the range of the spin button.

In portable code, min should be less than or equal to max. In wxMSW it is possible to specify minimum greater than maximum and the native control supports the same range as if they were reversed, but swaps the meaning of up and down arrows, however this dubious feature is not supported on other platforms.

Parameters:
  • min (int) – The minimum value for the spin button.

  • max (int) – The maximum value for the spin button.

Return type:

None


SetValue(self, value)¶

Sets the value of the spin button.

Parameters:

value (int) – The value for the spin button.

Return type:

None


Properties¶
Increment¶

See GetIncrement and SetIncrement


Max¶

See GetMax and SetMax


Min¶

See GetMin and SetMin


Range¶

See GetRange


Value¶

See GetValue and SetValue


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