broesi
asked on
Urgent question: Listview with checkboxes / column width
Hi Experts,
I have a listview with checkboxes and one additional column holding text information. The column for the checkboxes is too small, the checkboxes appear too close to the text.
Is it possible to make the checkbox-column wider?
broesi
I have a listview with checkboxes and one additional column holding text information. The column for the checkboxes is too small, the checkboxes appear too close to the text.
Is it possible to make the checkbox-column wider?
broesi
ListView1.ColumnHeader(1). Width=300
Clicked submit button to soon.
You can adjust column width in FormLoad event. Change 300 to whatever seems to work for you.
ListView1.ColumnHeader(2). Width=? would set width of the second column and so fort.
Mike
You can adjust column width in FormLoad event. Change 300 to whatever seems to work for you.
ListView1.ColumnHeader(2).
Mike
ASKER
Hm,
the listview only has one column, and that contains the text data!?
Here's the code used to populate the list:
Private Sub Form_Load()
Dim rs As ADODB.Recordset
Dim li As ListItem
Set rs = gDB.getRecordset("select MyText from tblMyTable"
lv.ColumnHeaders.Add , , "Text", 5000
Do While Not rs.EOF
Set li = lv.ListItems.Add()
li.Text = rs(0)
rs.MoveNext
Loop
End Sub
When I set a breakpoint at th do while... lv.columnheaders.count is 1
broesi
the listview only has one column, and that contains the text data!?
Here's the code used to populate the list:
Private Sub Form_Load()
Dim rs As ADODB.Recordset
Dim li As ListItem
Set rs = gDB.getRecordset("select MyText from tblMyTable"
lv.ColumnHeaders.Add , , "Text", 5000
Do While Not rs.EOF
Set li = lv.ListItems.Add()
li.Text = rs(0)
rs.MoveNext
Loop
End Sub
When I set a breakpoint at th do while... lv.columnheaders.count is 1
broesi
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi broesi,
All I know about List View, I have learned from Shauli. I am greatfull we have an expert like Shauli at EE. His response is more complete and to the point.
Regards,
Mike
All I know about List View, I have learned from Shauli. I am greatfull we have an expert like Shauli at EE. His response is more complete and to the point.
Regards,
Mike
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot, guys! I've split the point, because I used Noel's suggestion and Shauli gave a good explanation of what's actually going on - is that okay with you?
broesi
broesi
Im glad that you use that simple idea. the split was ok with me. actually, that is my 1st points earned here. but by just knowing that the code helps you makes me feel good. im happy. tnx. :)