Class WinControl
Inheritance
Control | WinControl 🡄 Control 🡄 Component 🡄 Object |
Properties
Control [ index ] | Array to access a child control. |
ControlCount | The number of child controls of this wincontrol. |
Handle | The internal windows handle. |
OnEnter | Function to be called when the WinControl gains focus. |
OnExit | Function to be called when the WinControl loses focus. |
Methods
canFocus () | Returns true if the object can be focused. |
focused () | Returns true when focused. |
getControl ( index ) | Returns a WinControl class object. |
getControlAtPos ( x, y ) | Gets the control at the given x,y position relative to the wincontrol's position. |
getControlCount () | Returns the number of Controls attached to this class. |
getOnEnter () | |
getOnExit () | |
setFocus () | Tries to set keyboard focus the object. |
setLayeredAttributes ( Key, Alpha, Flags ) | Sets the layered state for the control if possible. |
setOnEnter ( function ) | Sets an onEnter event (Triggered on focus enter). |
setOnExit ( function ) | Sets an onExit event (Triggered on lost focus). |
setShape ( bitmap ) | |
setShape ( region ) | Sets the region object as the new shape for this wincontrol. |
Inheritance
- Control
- WinControl 🡄 Control 🡄 Component 🡄 Object
Properties
- Control [ index ]
-
Array to access a child control.
Type:
- ControlCount
-
The number of child controls of this wincontrol.
Type:
int - Handle
-
The internal windows handle.
Type:
int - OnEnter
-
Function to be called when the WinControl gains focus.
Type:
func - OnExit
-
Function to be called when the WinControl loses focus.
Type:
func
Methods
- canFocus ()
-
Returns
true
if the object can be focused.Returns:
-
bool
- focused ()
-
Returns
true
when focused.Returns:
-
bool
- getControl ( index )
-
Returns a WinControl class object.
Parameters:
- index int
Returns:
- getControlAtPos ( x, y )
-
Gets the control at the given x,y position relative to the wincontrol's position.
Parameters:
- x int
- y int
- getControlCount ()
-
Returns the number of Controls attached to this class.
Returns:
-
int
- getOnEnter ()
- getOnExit ()
- setFocus ()
- Tries to set keyboard focus the object.
- setLayeredAttributes ( Key, Alpha, Flags )
-
Sets the layered state for the control if possible.
Only Forms are supported in in windows 7 and earlier. Flags can be a combination of LWAALPHA and/or LWACOLORKEY. See msdn SetLayeredWindowAttributes for more information
Parameters:
- Key
- Alpha
- Flags
- setOnEnter ( function )
-
Sets an onEnter event (Triggered on focus enter).
Parameters:
- function func
- setOnExit ( function )
-
Sets an onExit event (Triggered on lost focus).
Parameters:
- function func
- setShape ( bitmap )
-
Parameters:
- bitmap Bitmap
- setShape ( region )
-
Sets the region object as the new shape for this wincontrol.
Parameters:
- region Region