wIpCtrl

A IP control allows the user to enter an IP (v4) address in an easily understood format. Because of the limitation of Windows native control, IP control cannot change size after creation.

Notice: a IP control may recieve events propagated from its child text control. (wEvent_Text, wEvent_TextUpdate, wEvent_TextMaxlen etc.) In these case, event.window should be the child text control, not IP control itself.

Appearance:
Superclass:wControl
Events:wIpEvent wCommandEvent
wIpEventDescription
wEvent_IpChangedWhen the user changes a field or moves from one field to another.
wCommandEventDescription
wEvent_TextWhen the text changes.
wEvent_TextUpdateWhen the control is about to redraw itself.
wEvent_TextMaxlenWhen the user tries to enter more text into the control than the limit.
wEvent_TextEnterWhen pressing Enter key.

Procs

proc setFocus(self: wIpCtrl; index: range[0 .. 3]) {...}{.validate, property, raises: [],
    tags: [].}
Sets the focus to specified field.
proc setValue(self: wIpCtrl; value: int) {...}{.validate, property, raises: [], tags: [].}
Sets the address values for all four fields in the IP address control.
proc getValue(self: wIpCtrl): int {...}{.validate, property, raises: [], tags: [].}
Gets the address values for all four fields in the IP address control.
proc setIpAddress(self: wIpCtrl; ipAddress: IpAddress) {...}{.validate, property,
    raises: [], tags: [].}
Sets the address object for all four fields in the IP address control.
proc getIpAddress(self: wIpCtrl): IpAddress {...}{.validate, property, raises: [], tags: [].}
Gets the address object for all four fields in the IP address control.
proc setText(self: wIpCtrl; text: string) {...}{.validate, property, raises: [], tags: [].}
Sets the address text for all four fields in the IP address control.
proc getText(self: wIpCtrl): string {...}{.validate, property, raises: [], tags: [].}
Gets the address text for all four fields in the IP address control.
proc clear(self: wIpCtrl) {...}{.validate, raises: [], tags: [].}
Clears the contents of the IP address control.
proc getEditControl(self: wIpCtrl; index: range[0 .. 3]): wTextCtrl {...}{.validate, property,
    inline, raises: [], tags: [].}
Returns the text control part of the specified field.
proc getTextCtrl(self: wIpCtrl; index: range[0 .. 3]): wTextCtrl {...}{.validate, property,
    inline, raises: [], tags: [].}
Returns the text control part of the specified field. The same as getEditControl().
proc final(self: wIpCtrl) {...}{.raises: [], tags: [].}
Default finalizer for wIpCtrl.
proc init(self: wIpCtrl; parent: wWindow; id = wDefaultID; value: int = 0;
         pos = wDefaultPoint; size = wDefaultSize; font: wFont = nil; style: wStyle = 0) {...}{.
    validate, raises: [], tags: [].}
Initializer.
proc IpCtrl(parent: wWindow; id = wDefaultID; value: int = 0; pos = wDefaultPoint;
           size = wDefaultSize; font: wFont = nil; style: wStyle = 0): wIpCtrl {...}{.inline,
    discardable, raises: [], tags: [].}
Constructor, creating and showing a ip control.