read-only checkboxes for listview 
Author Message
 read-only checkboxes for listview

Is there a way to set checkboxes to read-only in a
listview control? I am setting the value dynamically from
within the code, and do NOT want the user to be able to
click in the check boxes.  

Gratefully,

T Smith



Sat, 30 Oct 2004 22:43:13 GMT  
 read-only checkboxes for listview
In the ItemCheck event you will have to reset the check state to what it is
supposed to be. Be sure to gate the event to avoid recursion in case this
event fires even when changing check state in code.


Quote:
> Is there a way to set checkboxes to read-only in a
> listview control? I am setting the value dynamically from
> within the code, and do NOT want the user to be able to
> click in the check boxes.

> Gratefully,

> T Smith



Sun, 31 Oct 2004 01:08:07 GMT  
 read-only checkboxes for listview
Private Sub ListView1_ItemCheck(ByVal Item As MSComctlLib.ListItem)
    Item.Checked = Not Item.Checked
End Sub

Mikhail Berlyant
Data Integrator, Data Systems
Launch Your Yahoo!Music Experience  http://launch.yahoo.com
Brainbench MVP for Visual Basic   www.brainbench.com


Quote:
> Is there a way to set checkboxes to read-only in a
> listview control? I am setting the value dynamically from
> within the code, and do NOT want the user to be able to
> click in the check boxes.

> Gratefully,

> T Smith



Sun, 31 Oct 2004 01:21:34 GMT  
 read-only checkboxes for listview
Looks like the recursion gate is not needed...for once MS decided to NOT
fire check event when changed by code.
Too bad the intrinsic controls didn't all do this!


Quote:
> In the ItemCheck event you will have to reset the check state to what it
is
> supposed to be. Be sure to gate the event to avoid recursion in case this
> event fires even when changing check state in code.



> > Is there a way to set checkboxes to read-only in a
> > listview control? I am setting the value dynamically from
> > within the code, and do NOT want the user to be able to
> > click in the check boxes.

> > Gratefully,

> > T Smith



Sun, 31 Oct 2004 01:21:22 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Checkboxes in the Listview-control

2. Checkbox in ListView

3. Checkboxes disappearing in listview control on Access form

4. Three state checkbox in listview

5. Checkbox in a listview

6. ListView & CheckBoxes

7. Listview checkboxes

8. listview with checkboxes!Urgent

9. Assignment of records via the MS ListView (using checkboxes)

10. Locking a ListView's checkboxes

11. Change Checkbox Image in Listview Control

12. VB6:TripleState Checkboxes in TreeView and ListView controls?

 

 
Powered by phpBB® Forum Software