J
Joe Abou Jaoude
Hi all,
I m trying to have a listview with gridlines. this will make the
listview look like a datagrid. any help would be appreciated.
I have tried to use the samples concerning the owner-drawn list,
unfortunately those samples only deal with listboxes (only one column).
Besides it's like rewriting from scratch a listview control, and i m
sure it will be hard and not as efficient as the already existing
listview control, so i m leaving this as a last option (unless someone
can show me a sample of a listview with owner drawn list)
I tried to inherits from a listview control and override the OnPaint
event (the first obvious choice of course) but that didn't work coz the
onPaint isn't called, apparently it's the form who does the painting of
the control.
I also tried P/Invoke with these constants: (actually i took the code
posted in this newsgroup entiteled "P/Invoke and ListView" posted by
Zahid)
Private Const LVM_GETEXTENDEDLISTVIEWSTYLE As Integer
= &H1037
Private Const LVM_SETEXTENDEDLISTVIEWSTYLE As Integer
= &H1036
Private Const LVS_EX_GRIDLINES As Integer = &H1
I don't know if that works with other people or if i missed something,
but the result was very disapointing.
the lines were in the middle of the listview items,it's really not
beautiful to see.
so anyone can tell me how can i have a listview with gridlines ?
I m trying to have a listview with gridlines. this will make the
listview look like a datagrid. any help would be appreciated.
I have tried to use the samples concerning the owner-drawn list,
unfortunately those samples only deal with listboxes (only one column).
Besides it's like rewriting from scratch a listview control, and i m
sure it will be hard and not as efficient as the already existing
listview control, so i m leaving this as a last option (unless someone
can show me a sample of a listview with owner drawn list)
I tried to inherits from a listview control and override the OnPaint
event (the first obvious choice of course) but that didn't work coz the
onPaint isn't called, apparently it's the form who does the painting of
the control.
I also tried P/Invoke with these constants: (actually i took the code
posted in this newsgroup entiteled "P/Invoke and ListView" posted by
Zahid)
Private Const LVM_GETEXTENDEDLISTVIEWSTYLE As Integer
= &H1037
Private Const LVM_SETEXTENDEDLISTVIEWSTYLE As Integer
= &H1036
Private Const LVS_EX_GRIDLINES As Integer = &H1
I don't know if that works with other people or if i missed something,
but the result was very disapointing.
the lines were in the middle of the listview items,it's really not
beautiful to see.
so anyone can tell me how can i have a listview with gridlines ?