Package wx :: Class Control
[frames | no frames]

Type Control

object --+            
         |            
    Object --+        
             |        
    EvtHandler --+    
                 |    
            Window --+
                     |
                    Control

Known Subclasses:
AnimationCtrlBase, AuiNotebook, AuiTabCtrl, AuiToolBar, BookCtrlBase, Button, CalendarCtrl, CheckBox, CollapsiblePane, ComboBox, ComboCtrl, ControlWithItems, DatePickerCtrlBase, Gauge, GenericDirCtrl, HyperlinkCtrl, LEDNumberCtrl, ListCtrl, MediaCtrl, PickerBase, PyControl, RadioBox, RadioButton, RichTextCtrl, ScrollBar, Slider, SpinButton, SpinCtrl, StaticBitmap, StaticBox, StaticLine, StaticPicture, StaticText, StyledTextCtrl, TextCtrl, ToggleButton, ToolBarBase, TreeCtrl, TreeListCtrl, WebKitCtrl

This is the base class for a control or 'widget'.

A control is generally a small window which processes user input and/or displays one or more item of data.


Method Summary
Control __init__(self, parent, id, pos, size, style, validator, name)
Create a Control.
  Command(self, event)
Simulates the effect of the user issuing a command to the item.
bool Create(self, parent, id, pos, size, style, validator, name)
Do the 2nd phase and create the GUI control.
int GetAlignment(self)
Get the control alignment (left/right/centre, top/bottom/centre)
VisualAttributes GetClassDefaultAttributes(variant)
Get the default attributes for this class. (Static method)
String GetLabelText(self)
Get just the text of the label, without mnemonic characters ('&')

Property Summary
  Alignment: See GetAlignment
  LabelText: See GetLabelText
  thisown: The membership flag

Instance Method Details

__init__(self, parent, id=-1, pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=ControlNameStr)
(Constructor)

Create a Control. Normally you should only call this from a subclass' __init__ as a plain old wx.Control is not very useful.

Parameters:
parent
           (type=Window)

id
           (type=int)

pos
           (type=Point)

size
           (type=Size)

style
           (type=long)

validator
           (type=Validator)

name
           (type=String)

Returns:
Control
Overrides:
wx.Window.__init__

Command(self, event)

Simulates the effect of the user issuing a command to the item.

Parameters:
event
           (type=CommandEvent)

See Also:

wx.CommandEvent

Create(self, parent, id=-1, pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=ControlNameStr)

Do the 2nd phase and create the GUI control.

Parameters:
parent
           (type=Window)

id
           (type=int)

pos
           (type=Point)

size
           (type=Size)

style
           (type=long)

validator
           (type=Validator)

name
           (type=String)

Returns:
bool
Overrides:
wx.Window.Create

GetAlignment(self)

Get the control alignment (left/right/centre, top/bottom/centre)

Returns:
int

GetLabelText(self)

Get just the text of the label, without mnemonic characters ('&')

Returns:
String

Static Method Details

GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)

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.

Parameters:
variant
           (type=int)

Returns:
VisualAttributes

Property Details

Alignment

See GetAlignment

Get Method:
GetAlignment(self)

LabelText

See GetLabelText

Get Method:
GetLabelText(self)

thisown

The membership flag


Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:54:02 2009 http://epydoc.sf.net