[Gambas-user] Gridview select and deselect
charlesg
charles at ...1784...
Fri Apr 17 16:08:45 CEST 2009
Hi all
Having selected a gridview row with a click, I cannot deselect it with
another click as should be normal.
After reading an old thread here, I have fudged it with an array bSelected
which keeps track of which rows in gvRequired are selected.
'-------------------------------------------------------------
PUBLIC SUB gvRequired_Click()
IF bSelected[gvRequired.Row] THEN
bSelected[gvRequired.row] = FALSE
ELSE
bSelected[gvRequired.row] = TRUE
ENDIF
txtItem.SetFocus
END
'-------------------------------------------------------------
PUBLIC SUB gvRequired_LostFocus()
DIM x AS Integer
gvRequired.Rows.Unselect
FOR x = 0 TO gvRequired.Rows.count - 2
IF bSelected[x] THEN
gvRequired.Rows[x].Selected = TRUE
ENDIF
NEXT
END
'-------------------------------------------------------------
This can't interpret shift+click and ctrl+click used to create the
selection. How can I trap shift+click on a gridview?
Or am I as usual making a whale of a gambas :)
rgds
--
View this message in context: http://www.nabble.com/Gridview-select-and-deselect-tp23098365p23098365.html
Sent from the gambas-user mailing list archive at Nabble.com.
More information about the User
mailing list