Retrieving Column clicked in LISTBOX browse

Post Reply
GWard

Retrieving Column clicked in LISTBOX browse

Post by GWard »

How can I access the column number clicked when using a LISTBOX?

I thought oLbx:nAtCol held the value but apparently it is always ZERO
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

GWard,

You have to call it this way: oLbx:nAtCol( nColPixel ) where nColPixel is the column in pixels where the mouse has clicked.

You may review classes\wbrowse.prg to see how such method is used.
regards, saludos

Antonio Linares
www.fivetechsoft.com
GWard

Post by GWard »

Many thanks,

I used oLbx:bLClicked := {|nRow,nCol,nKeyFlags| MyFunction(oLbx,nCol)}

Then

FUNCTION MyFunction(oLbx,nCol)
LOCAL iActualCol := oLbx:nAtCol(nCol)

do case
case iActualCol=1
endc
... Etc
Post Reply