Click or drag to resize

DataBrowser.ColumnFocusChange Method (Typed)

X#
Provide a method that is invoked when the column focus is changed.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOGUIClasses (in XSharp.VOGUIClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD ColumnFocusChange(
	oDataColumn AS DataColumn,
	lHasFocus AS LOGIC
) AS Object
Request Example View Source

Parameters

oDataColumn
Type: DataColumn
The column that is gaining or losing focus.
lHasFocus
Type: Logic
TRUE indicates the column is gaining focus; FALSE indicates the column is losing focus.

Return Value

Type: Object
Remarks
When column focus is changed (i.e., the user moves from one column to another), typically there will be two events generated, thus ColumnFocusChange() will be called twice. The first event will be for the previous column losing focus and the second event will be for the new column gaining focus. You can trap either event by checking the value of lHasFocus.
Examples
The following code demonstrates how the ColumnFocusChange handler can be used:
X#
1CLASS MyDataBrowser INHERIT DATABROWSER
2METHOD ColumnFocusChange(oDataColumn, lHasFocus) CLASS MyDataBrowser
3SUPER:FocusChange(oDataColumn, lHasFocus)
4IF lHasFocus
5TextBox{ SELF, oDataColumn:Name, "Gaining Focus"}:Show()
6ELSE
7TextBox{ SELF, oDataColumn:Name, "Losing Focus"}:Show()
8ENDIF
9RETURN SELF
See Also