Page 1 of 1
ListIcon: How to count how many Columns?
Posted: Sat Nov 12, 2005 9:18 pm
by guruk
something like: amount=CountGadgetColumns (#ListIcon_1)
Hope you have an Idea
chris
Posted: Sat Nov 12, 2005 9:24 pm
by srod
One way is to ask the header control for the number of items:
Code: Select all
headerhWnd=SendMessage_(GadgetID(1),#LVM_GETHEADER,0,0)
debug sendmessage_(headerhWnd, #HDM_GETITEMCOUNT,0,0)
Regards.
Posted: Sat Nov 12, 2005 9:32 pm
by guruk
Great.. Only till now PB dont know what #LVM_GETHEADER is???
and same with: #HDM_GETITEMCOUNT
any idea?
chris
Posted: Sat Nov 12, 2005 9:38 pm
by srod
The #LVM_GETHEADER message simply retrieves the handle of the header control which is attached to the ListIcon gadget.
The column headings you see in a ListIcon gadget are actually part of a Windows header control which has been bound to the ListIcon. You can use header controls almost anywhere, not just with ListIcons.
Anyhow, the number of columns in a ListIcon is simply the number of items in the attached header control.
Posted: Sat Nov 12, 2005 9:48 pm
by guruk
Thanks.. now it works for me
chris
Posted: Sun Nov 13, 2005 12:12 am
by Thorsten1867
In 'MoreListIconGadget'-Lib you find a lot of functions like 'GetColumnsNumber(#Gadget)' and more.
Look at:
http://denislabarre.free.fr/Librairies/ ... 201_31.zip