on 09-11-2014 6:29 PM
treeview provode checkbox with state picture. When click on the pic, it will change the state pic.
I want to have this on display, but only for display, not allow user click on it to switch state pic. It means checkbox is read-only.
How to do it?
Hi,
You can do this :
-Create a function :
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 )
}
-In the Clicked Event of the treeview add this code :
long ll_state
treeviewitem ltvi
tv_1.GetItem ( handle, ltvi)
ll_state = ltvi.statepictureindex
post wf_set_checkbox_state (handle, ll_state)
Regards.
Abdallah.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do not forget to add some additional code in an event mapped to pbm_keydown:
if keyflags = 0 and key = KeySpacebar! then return 1
hth
Arnd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.