Click or drag to resize

Window.ListViewMouseButtonDown Method (Typed)

X#
Provide a method that is invoked when a mouse button is clicked in a list view control.

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOGUIClasses (in XSharp.VOGUIClasses.dll) Version: 2.21
Syntax
 VIRTUAL METHOD ListViewMouseButtonDown(
	oListViewMouseEvent AS ListViewMouseEvent
) AS USUAL
Request Example View Source

Parameters

oListViewMouseEvent
Type: ListViewMouseEvent
The ListViewMouseEvent object that describes which list control received a mouse button click.

Return Value

Type: Usual
This method calls Window.Default() and returns the result of Window.Default()
Remarks
Tip Tip
Important! This is a callback method used by X#. Normally, it should not be called in your application code.
Examples
Typical example of a ListViewMouseButtonDown usage. Note that in the example, the item's record number is stored in the "value" of the LVI, whereas the text of the item is stored in the "text" entity. Obviously this will only work when using a string-type column in the ListView for storing the record number also.
X#
 1METHOD ListViewMouseButtonDown(oListViewMouseEvent) CLASS CoachesBrowse
 2LOCAL sSym AS SYMBOL
 3LOCAL oLVI AS ListViewItem
 4SUPER:ListViewMouseButtonDown(oListViewMouseEvent)
 5//Put your changes here
 6oLVI := oListViewMouseEvent:ListViewItem
 7sSym := oListViewMouseEvent:NameSym
 8DO CASE
 9CASE sSym == #lvCoaches
10IF oLVI != NULL_OBJECT
11IF oListViewMouseEvent:PointOnItem
12SELF:iCoachRec := oLVI:GetValue( #cCoachName )
13SELF:cSelCoach := oLVI:GetText( #cCoachName )
14SELF:oDbCoaches:GoTo( SELF:iCoachRec )
15ENDIF
16ENDIF
17ENDCASE
See Also