Posts: 1,000
Threads: 253
Joined: Feb 2008
I'm trying to get the QM grid checkboxes to behave like a radio button so when one is checked, all the rest are unchecked.
I can't figure out how to get the GRID to notify on checkbox change.
Thanks,
Jim
Posts: 1,337
Threads: 61
Joined: Jul 2006
Function sample_Grid_images
;Shows how to receive check box notifications from the second grid control.
;It is not necessary, but if you need it.
;Don't forget to add the 'case WM_NOTIFY goto messages3' line.
;messages3
NMHDR* nh=+lParam
sel nh.idFrom
,case 4
,sel nh.code
,,case LVN_ITEMCHANGED
,,int row isChecked
,,if(g.RowIsCheckNotification(lParam row isChecked)) out "%schecked %i" iif(isChecked "" "un") row
Posts: 1,000
Threads: 253
Joined: Feb 2008
Thanks!
;messages3
NMHDR* nh=+lParam
sel nh.idFrom
,case 3
,sel nh.code
,,case LVN_ITEMCHANGED
,,int row isChecked
,,g.RowIsCheckNotification(lParam row isChecked)
,,for int'r 0 g.RowsCountGet
,,,if r=row
,,,,g.RowCheck(r 1)
,,,else
,,,,g.RowCheck(r 0)
,,,
Posts: 1,337
Threads: 61
Joined: Jul 2006
slightly different no need to check the row that you just put a check in again
;messages3
NMHDR* nh=+lParam
sel nh.idFrom
,case 3
,sel nh.code
,,case LVN_ITEMCHANGED
,,int row isChecked
,,g.RowIsCheckNotification(lParam row isChecked)
,,for int'r 0 g.RowsCountGet
,,,if r!=row
,,,,g.RowCheck(r 0)
|