Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to disable mouse click on checkbox for each treeviewitem?

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?

Former Member
Former Member replied

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.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question