Is it possible to have a checkbox in a cell(s) of an Msflexgrid? i have been trying to find some help on the net but no luck. any sample code would greatly be appreciated!Thanx in advance zann.
The only thing that you can do is to create floating check boxes much the same way as you create floating text boxes. The check box will sit on top of a specific cell and the user will think that it is part of the grid.
The check box .value property would have to be set manually.
Search this forum for 'MSFlexgrid' and/or 'floating text box' and you should find some examples. Thanks and Good Luck!
if you want a column of checkboxes, one for each row then you could use the mousecol and mouserow properties of the flexgrid in the click event
code would be something like:
(if column 10 is your column of "checkboxes"
private sub grid_click()
if grid.mousecol=10 then
if grid.textmatrix(grid.mouserow,grid.mousecol)="X" then
grid.textmatrix(grid.mouserow,grid.mousecol)=""
else
grid.textmatrix(grid.mouserow,grid.mousecol)="X"
end if
end if
end sub
This will give you a check box effect - clicking on the grid in row 10 toggles an X in it - then you can look at the value in the grid to see which rows have been checked.
(most of this I picked up from Mike James in Computer Shopper magazine in the UK a while back)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.