Hi,
I was just wondering whether anyone knows how to detect if a vertical scrollbar is showing in a ListIconGadget. I need to change the size of the ListIconGadget columns if the vertical scrollbar is showing to prevent the horizontal scrollbar from displaying.
Thanks
Scrollbar in ListIconGadget
Re: Scrollbar in ListIconGadget
Send a message (after output):
SendMessage_(ListHandle,#LVM_SETCOLUMNWIDTH,n,#LVSCW_AUTOSIZE_USEHEADER)
where n is the last column.
This will do the job automagically.
You can also send this message each time after resizing is finished (but you need a callback to catch the event).
SendMessage_(ListHandle,#LVM_SETCOLUMNWIDTH,n,#LVSCW_AUTOSIZE_USEHEADER)
where n is the last column.
This will do the job automagically.
You can also send this message each time after resizing is finished (but you need a callback to catch the event).
Horst.
-
- User
- Posts: 27
- Joined: Sat Oct 16, 2004 1:25 pm
Thanks horst! I had a few problems getting this to work and in case anyone has to do this in future the actual code I used was:
SendMessage_(GadgetID(#ListIconGadget), #LVM_SETCOLUMNWIDTH, 1, #LVSCW_AUTOSIZE_USEHEADER)
where #ListIconGadget is the ListIconGadget identifier number/constant. The only difference is that I added GadgetID, which may seem obvious but not to someone who's still learning!
SendMessage_(GadgetID(#ListIconGadget), #LVM_SETCOLUMNWIDTH, 1, #LVSCW_AUTOSIZE_USEHEADER)
where #ListIconGadget is the ListIconGadget identifier number/constant. The only difference is that I added GadgetID, which may seem obvious but not to someone who's still learning!