Page 1 of 1
ListIconGadget() column headers detection
Posted: Mon May 16, 2005 6:54 pm
by PB&J Lover
Can the column headers for the listboxes be used as buttons? If I click on one can that be detected (so that I could sort by that column or something)?
Thanks
Posted: Mon May 16, 2005 7:07 pm
by J. Baker
Have you tried these...
Code: Select all
GetGadgetItemText(#Gadget, Item, Column)
SetGadgetItemText(#Gadget, Item, Text$, Column)
Column starts with "0".
Column Header buttons
Posted: Mon May 16, 2005 7:32 pm
by PB&J Lover
Yes, I use them in my program. I am talking about the column headers (which appear to be buttons). Can a click on them be detected (they are not in the event loop).
I am not talking about the data in the list itself, this is a different part of the gadget.
Thanks
Posted: Mon May 16, 2005 8:00 pm
by J. Baker
Not that I'm aware of because in the manual, it doesn't give them any kind of value. I could be wrong though. Sorry I could't be more help.
Re: ListIconGadget() column headers detection
Posted: Tue May 17, 2005 4:41 pm
by TerryHough
dbwisc wrote:Can the column headers for the listboxes be used as buttons? If I click on one can that be detected (so that I could sort by that column or something)?
Do a search for listicon and you will find several examples.
Here is one that might help you
viewtopic.php?t=13224&highlight=listicon
although there are ways to do it without the library.
I use a procedure that I include (based on code found on these forums) in
my programs. However, it requres a slightly different definition of the
listicon gadgets to make it work. You can see it at work in the source code
available at
http://elfecc.no-ip.info/purebasic#FTP_Library
Good luck
Terry
Posted: Wed May 17, 2006 10:25 pm
by lee__48
I asked a similar question on the Coding Questions board earlier today.
http://www.purebasic.fr/english/viewtopic.php?t=21864
Lee
Posted: Wed May 17, 2006 11:28 pm
by Dare2
@TerryHough,
That is a good collection of PureBasic stuff! Probably not enough people know about it, hopefully this brings it to people's attention.
Neat.
Edit: BTW, how do you pronounce your surname?

Rhymes with ... (From an earlier, blocked, discussion.)
Posted: Thu May 18, 2006 3:39 pm
by TerryHough
@Dare2
Thanks. I hope some are found useful.
And that would be like rough, tough, and enough.

Posted: Thu May 25, 2006 8:07 pm
by fsw
The manual states:
- GetGadgetItemText()
Syntax
Result$ = GetGadgetItemText(#Gadget, Item, Column)
Description
...
- ListIconGadget() - returns the entry of the given 'Item' and 'Column'. If 'Item' = -1, the 'Column' header is returned.
...
Posted: Tue May 30, 2006 3:04 am
by Amundo
Wow TerryHough, (hope that doesn't rhyme)
Just browsing your site...what a lot of work!
Thanks for sharing, just wish I had more time to go through all this code.
Dare2's spot on, this is a resource worth knowing about.