📄 _controls.py
字号:
def SetMark(*args, **kwargs):
"""
SetMark(self, long from, long to)
Selects the text between the two positions in the combobox text field.
"""
return _controls_.ComboBox_SetMark(*args, **kwargs)
def GetMark(*args, **kwargs):
"""
GetMark(self) -> (from, to)
Gets the positions of the begining and ending of the selection mark in
the combobox text field.
"""
return _controls_.ComboBox_GetMark(*args, **kwargs)
def GetCurrentSelection(*args, **kwargs):
"""
GetCurrentSelection(self) -> int
Unlike `GetSelection` which only returns the accepted selection value,
i.e. the selection in the control once the user closes the dropdown
list, this function returns the current selection. That is, while the
dropdown list is shown, it returns the currently selected item in
it. When it is not shown, its result is the same as for the other
function.
"""
return _controls_.ComboBox_GetCurrentSelection(*args, **kwargs)
def SetStringSelection(*args, **kwargs):
"""
SetStringSelection(self, String string) -> bool
Select the item with the specifed string
"""
return _controls_.ComboBox_SetStringSelection(*args, **kwargs)
def SetString(*args, **kwargs):
"""
SetString(self, int n, String string)
Set the label for the n'th item (zero based) in the list.
"""
return _controls_.ComboBox_SetString(*args, **kwargs)
def SetEditable(*args, **kwargs):
"""SetEditable(self, bool editable)"""
return _controls_.ComboBox_SetEditable(*args, **kwargs)
def SetInsertionPointEnd(*args, **kwargs):
"""
SetInsertionPointEnd(self)
Sets the insertion point at the end of the combobox text field.
"""
return _controls_.ComboBox_SetInsertionPointEnd(*args, **kwargs)
def Remove(*args, **kwargs):
"""
Remove(self, long from, long to)
Removes the text between the two positions in the combobox text field.
"""
return _controls_.ComboBox_Remove(*args, **kwargs)
def IsEditable(*args, **kwargs):
"""
IsEditable(self) -> bool
Returns True if the combo is ediatable (not read-only.)
"""
return _controls_.ComboBox_IsEditable(*args, **kwargs)
def Undo(*args, **kwargs):
"""
Undo(self)
Redoes the last undo in the text field. Windows only.
"""
return _controls_.ComboBox_Undo(*args, **kwargs)
def Redo(*args, **kwargs):
"""
Redo(self)
Undoes the last edit in the text field. Windows only.
"""
return _controls_.ComboBox_Redo(*args, **kwargs)
def SelectAll(*args, **kwargs):
"""
SelectAll(self)
Select all the text in the combo's text field.
"""
return _controls_.ComboBox_SelectAll(*args, **kwargs)
def CanCopy(*args, **kwargs):
"""
CanCopy(self) -> bool
Returns True if the combobox is editable and there is a text selection
to copy to the clipboard. Only available on Windows.
"""
return _controls_.ComboBox_CanCopy(*args, **kwargs)
def CanCut(*args, **kwargs):
"""
CanCut(self) -> bool
Returns True if the combobox is editable and there is a text selection
to copy to the clipboard. Only available on Windows.
"""
return _controls_.ComboBox_CanCut(*args, **kwargs)
def CanPaste(*args, **kwargs):
"""
CanPaste(self) -> bool
Returns True if the combobox is editable and there is text on the
clipboard that can be pasted into the text field. Only available on
Windows.
"""
return _controls_.ComboBox_CanPaste(*args, **kwargs)
def CanUndo(*args, **kwargs):
"""
CanUndo(self) -> bool
Returns True if the combobox is editable and the last edit can be
undone. Only available on Windows.
"""
return _controls_.ComboBox_CanUndo(*args, **kwargs)
def CanRedo(*args, **kwargs):
"""
CanRedo(self) -> bool
Returns True if the combobox is editable and the last undo can be
redone. Only available on Windows.
"""
return _controls_.ComboBox_CanRedo(*args, **kwargs)
def GetClassDefaultAttributes(*args, **kwargs):
"""
GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
Get the default attributes for this class. This is useful if you want
to use the same font or colour in your own control as in a standard
control -- which is a much better idea than hard coding specific
colours or fonts which might look completely out of place on the
user's system, especially if it uses themes.
The variant parameter is only relevant under Mac currently and is
ignore under other platforms. Under Mac, it will change the size of
the returned font. See `wx.Window.SetWindowVariant` for more about
this.
"""
return _controls_.ComboBox_GetClassDefaultAttributes(*args, **kwargs)
GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
_controls_.ComboBox_swigregister(ComboBox)
ComboBoxNameStr = cvar.ComboBoxNameStr
def PreComboBox(*args, **kwargs):
"""
PreComboBox() -> ComboBox
Precreate a ComboBox control for 2-phase creation.
"""
val = _controls_.new_PreComboBox(*args, **kwargs)
return val
def ComboBox_GetClassDefaultAttributes(*args, **kwargs):
"""
ComboBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
Get the default attributes for this class. This is useful if you want
to use the same font or colour in your own control as in a standard
control -- which is a much better idea than hard coding specific
colours or fonts which might look completely out of place on the
user's system, especially if it uses themes.
The variant parameter is only relevant under Mac currently and is
ignore under other platforms. Under Mac, it will change the size of
the returned font. See `wx.Window.SetWindowVariant` for more about
this.
"""
return _controls_.ComboBox_GetClassDefaultAttributes(*args, **kwargs)
#---------------------------------------------------------------------------
GA_HORIZONTAL = _controls_.GA_HORIZONTAL
GA_VERTICAL = _controls_.GA_VERTICAL
GA_SMOOTH = _controls_.GA_SMOOTH
GA_PROGRESSBAR = 0 # obsolete
class Gauge(_core.Control):
"""Proxy of C++ Gauge class"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
"""
__init__(self, Window parent, int id=-1, int range=100, Point pos=DefaultPosition,
Size size=DefaultSize, long style=GA_HORIZONTAL,
Validator validator=DefaultValidator,
String name=GaugeNameStr) -> Gauge
"""
_controls_.Gauge_swiginit(self,_controls_.new_Gauge(*args, **kwargs))
self._setOORInfo(self)
def Create(*args, **kwargs):
"""
Create(self, Window parent, int id=-1, int range=100, Point pos=DefaultPosition,
Size size=DefaultSize, long style=GA_HORIZONTAL,
Validator validator=DefaultValidator,
String name=GaugeNameStr) -> bool
"""
return _controls_.Gauge_Create(*args, **kwargs)
def SetRange(*args, **kwargs):
"""SetRange(self, int range)"""
return _controls_.Gauge_SetRange(*args, **kwargs)
def GetRange(*args, **kwargs):
"""GetRange(self) -> int"""
return _controls_.Gauge_GetRange(*args, **kwargs)
def SetValue(*args, **kwargs):
"""SetValue(self, int pos)"""
return _controls_.Gauge_SetValue(*args, **kwargs)
def GetValue(*args, **kwargs):
"""GetValue(self) -> int"""
return _controls_.Gauge_GetValue(*args, **kwargs)
def IsVertical(*args, **kwargs):
"""IsVertical(self) -> bool"""
return _controls_.Gauge_IsVertical(*args, **kwargs)
def SetShadowWidth(*args, **kwargs):
"""SetShadowWidth(self, int w)"""
return _controls_.Gauge_SetShadowWidth(*args, **kwargs)
def GetShadowWidth(*args, **kwargs):
"""GetShadowWidth(self) -> int"""
return _controls_.Gauge_GetShadowWidth(*args, **kwargs)
def SetBezelFace(*args, **kwargs):
"""SetBezelFace(self, int w)"""
return _controls_.Gauge_SetBezelFace(*args, **kwargs)
def GetBezelFace(*args, **kwargs):
"""GetBezelFace(self) -> int"""
return _controls_.Gauge_GetBezelFace(*args, **kwargs)
def GetClassDefaultAttributes(*args, **kwargs):
"""
GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
Get the default attributes for this class. This is useful if you want
to use the same font or colour in your own control as in a standard
control -- which is a much better idea than hard coding specific
colours or fonts which might look completely out of place on the
user's system, especially if it uses themes.
The variant parameter is only relevant under Mac currently and is
ignore under other platforms. Under Mac, it will change the size of
the returned font. See `wx.Window.SetWindowVariant` for more about
this.
"""
return _controls_.Gauge_GetClassDefaultAttributes(*args, **kwargs)
GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
_controls_.Gauge_swigregister(Gauge)
GaugeNameStr = cvar.GaugeNameStr
def PreGauge(*args, **kwargs):
"""PreGauge() -> Gauge"""
val = _controls_.new_PreGauge(*args, **kwargs)
return val
def Gauge_GetClassDefaultAttributes(*args, **kwargs):
"""
Gauge_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
Get the default attributes for this class. This is useful if you want
to use the same font or colour in your own control as in a standard
control -- which is a much better idea than hard coding specific
colours or fonts which might look completely out of place on the
user's system, especially if it uses themes.
The variant parameter is only relevant under Mac currently and is
ignore under other platforms. Under Mac, it will change the size of
the returned font. See `wx.Window.SetWindowVariant` for more about
this.
"""
return _controls_.Gauge_GetClassDefaultAttributes(*args, **kwargs)
#---------------------------------------------------------------------------
class StaticBox(_core.Control):
"""Proxy of C++ StaticBox class"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
"""
__init__(self, Window parent, int id=-1, String label=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=0, String name=StaticBoxNameStr) -> StaticBox
"""
_controls_.StaticBox_swiginit(self,_controls_.new_StaticBox(*args, **kwargs))
self._setOORInfo(self)
def Create(*args, **kwargs):
"""
Create(self, Window parent, int id=-1, String label=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=0, String name=StaticBoxNameStr) -> bool
"""
return _controls_.StaticBox_Create(*args, **kwargs)
def GetClassDefaultAttributes(*args, **kwargs):
"""
GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
Get the default attributes for this class. This is useful if you want
to use the same font or colour in your own control as in a standard
control -- which is a much better idea than hard coding specific
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -