keyselector!() { /* proc-macro */ }Expand description
Creates a new keyselector control. The format is keyselector!("attributes") where the attributes are pairs of key-value , separated by comma, in the format key=value or key:value.
If the value is a string, use single quotes to delimit the value.
The following attributes are supported:
key- the key selected by the keyselector. The key should be a valid key (see thekey!macro)flags- the flags of the keyselector. The following values are supported:- AcceptEnter - the keyselector will process the Enter key
- AcceptEscape - the keyselector will process the Escape key
- AcceptTab - the keyselector will process the Tab key
- ReadOnly - the keyselector is read-only
- position attributes:
xandy, - size attributes:
widthorw(alias), - margin attributes:
leftorl(alias),rightorr(alias),toport(alias),bottomorb(alias) - Alignment attributes:
alignora(alias) - one of Left, Right, Top, Bottom, Center, TopLeft, TopRight, BottomLeft, BottomRightdockord(alias) - one of Left, Right, Top, Bottom, Center, TopLeft, TopRight, BottomLeft, BottomRight
- State attributes:
enabled,visible
ยงExample
keyselector!("key='F2', x=10, y=10, width=20")
Alternatively, the first parameter (if the key is not specified) is consider the key:
keyselector!("'Ctrl+Alt+F2', x:0, y=10, w:20")