Home | Trees | Index | Help |
|
---|
Package wx :: Package lib :: Package masked :: Module numctrl |
|
Being derived from masked.TextCtrl, the control only allows fixed-point notation. That is, it has a fixed (though reconfigurable) maximum width for the integer portion and optional fixed width fractional portion.
Here's the API:
from wx.lib.masked import NumCtrl NumCtrl( parent, id = -1, value = 0, pos = wx.DefaultPosition, size = wx.DefaultSize, style = 0, validator = wx.DefaultValidator, name = "masked.number", integerWidth = 10, fractionWidth = 0, allowNone = False, allowNegative = True, useParensForNegatives = False, groupDigits = False, groupChar = ',', decimalChar = '.', min = None, max = None, limited = False, selectOnEntry = True, foregroundColour = "Black", signedForegroundColour = "Red", emptyBackgroundColour = "White", validBackgroundColour = "White", invalidBackgroundColour = "Yellow", autoSize = True )
Resets the minimum value of the control. If a value of <I>None</I> is provided, then the control will have no explicit minimum value. If the value specified is greater than the current maximum value, then the function returns False and the minimum will not change from its current setting. On success, the function returns True.
If successful and the current value is lower than the new lower bound, if the control is limited, the value will be automatically adjusted to the new minimum value; if not limited, the value in the control will be colored as invalid.
If min > the max value allowed by the width of the control, the function will return False, and the min will not be set.
Resets the maximum value of the control. If a value of <I>None</I> is provided, then the control will have no explicit maximum value. If the value specified is less than the current minimum value, then the function returns False and the maximum will not change from its current setting. On success, the function returns True.
If successful and the current value is greater than the new upper bound, if the control is limited the value will be automatically adjusted to this maximum value; if not limited, the value in the control will be colored as invalid.
If max > the max value allowed by the width of the control, the function will return False, and the max will not be set.
GetLimited()
GetAllowNone()
GetAllowNegative()
GetGroupDigits()
Classes | |
---|---|
NumberUpdatedEvent |
Used to fire an EVT_NUM event whenever the value in a NumCtrl changes. |
NumCtrl |
Masked edit control supporting "native" numeric values, ie. |
NumCtrlAccessorsMixin |
Defines masked.NumCtrl's list of attributes having their own Get/Set functions, ignoring those that make no sense for a numeric control. |
Variable Summary | |
---|---|
Logger |
dbg = <wx.tools.dbg.Logger instance at 0xb784ea6c>
|
PyEventBinder |
EVT_NUM = <wx._core.PyEventBinder object at 0xb784eaac>
|
int |
MININT = -2147483648 |
int |
wxEVT_COMMAND_MASKED_NUMBER_UPDATED = 10286 |
Variable Details |
---|
dbg
|
EVT_NUM
|
MININT
|
wxEVT_COMMAND_MASKED_NUMBER_UPDATED
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:08:40 2007 | http://epydoc.sf.net |