How to disable mouse click on checkbox for each treeview
item
Symptom
How to disable the mouse click in a TreeView control on checkbox
for each treeview item.
Environment
PowerBuilder
Solution
1. Create a function:
|
1 2 3 4 5 6 7 |
wf_set_checkbox_state (long al_tvihandle, long al_state) { treeviewitem ltvi tv_1.GetItem ( al_tvihandle, ltvi) ltvi.statepictureindex = al_state tv_1.SetItem ( al_tvihandle, ltvi ) } |
2. In the Clicked Event of the treeview add this code:
|
1 2 3 4 5 |
long ll_state treeviewitem ltvi tv_1.GetItem ( handle, ltvi) ll_state = ltvi.statepictureindex post wf_set_checkbox_state (handle, ll_state) |
3. Create a user event mapped to pbm_keydown and put in it this
code:
|
1 |
if keyflags = 0 and key = KeySpacebar! then return 1 |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest