wControl

This is the base class for a GUI controls.

Superclass:wWindow
Subclasses:wStatusBar wToolBar wButton wCheckBox wRadioButton wStaticBox wListBox wTextCtrl wComboBox wCheckComboBox wStaticText wStaticBitmap wStaticLine wNoteBook wSpinCtrl wSpinButton wSlider wScrollBar wGauge wCalendarCtrl wDatePickerCtrl wTimePickerCtrl wListCtrl wTreeCtrl wHyperlinkCtrl wSplitter wIpCtrl wWebView wHotkeyCtrl wRebar (experimental)

Procs

proc setBuddy(self: wControl; buddy: wControl; direction: int = wRight;
             length = wDefault; indent = 0) {...}{.raises: [Exception, wError],
                                        tags: [RootEffect].}

Sets a control as the buddy to this control. The buddy control will be attached to the border specified by direction (wUp, wDown, wLeft, wRight), and occupies part of non-client area in length. buddy can be nil to cancel the relationship. Notice: buddy control should be a sibling, not a child.

For example, a text control with a "Browse" button as a buddy:

let textctrl = TextCtrl(panel, style=wBorderSunken, pos=(10, 10))
let button = Button(panel, label="...")
textctrl.setBuddy(button, wRight, length=25)

Methods

method getClientSize(self: wControl): wSize {...}{.locks: "unknown", raises: [], tags: [].}
Returns the size of the control 'client area' in pixels.
method getClientAreaOrigin(self: wControl): wPoint {...}{.locks: "unknown", raises: [],
    tags: [].}
Gets the origin of the client area of the control.