ListIconGadget() column headers detection

Windows specific forum
PB&J Lover
Enthusiast
Enthusiast
Posts: 212
Joined: Fri Apr 22, 2005 2:07 pm
Location: U.S.A.
Contact:

ListIconGadget() column headers detection

Post 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
-- DB

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage — to move in the opposite direction.

Albert Einstein
User avatar
J. Baker
Addict
Addict
Posts: 2181
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post by J. Baker »

Have you tried these...

Code: Select all

GetGadgetItemText(#Gadget, Item, Column)
SetGadgetItemText(#Gadget, Item, Text$, Column)
Column starts with "0".
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
PB&J Lover
Enthusiast
Enthusiast
Posts: 212
Joined: Fri Apr 22, 2005 2:07 pm
Location: U.S.A.
Contact:

Column Header buttons

Post 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
-- DB

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage — to move in the opposite direction.

Albert Einstein
User avatar
J. Baker
Addict
Addict
Posts: 2181
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post 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.
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
TerryHough
Enthusiast
Enthusiast
Posts: 781
Joined: Fri Apr 25, 2003 6:51 pm
Location: NC, USA
Contact:

Re: ListIconGadget() column headers detection

Post 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
lee__48
User
User
Posts: 21
Joined: Thu Dec 08, 2005 3:17 am
Location: UK

Post 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
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post 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.)
@}--`--,-- A rose by any other name ..
TerryHough
Enthusiast
Enthusiast
Posts: 781
Joined: Fri Apr 25, 2003 6:51 pm
Location: NC, USA
Contact:

Post by TerryHough »

@Dare2
Thanks. I hope some are found useful.

And that would be like rough, tough, and enough. :D
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Post 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.
    ...
Amundo
Enthusiast
Enthusiast
Posts: 200
Joined: Thu Feb 16, 2006 1:41 am
Location: New Zealand

Post 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.
Win10, PB6.x, okayish CPU, onboard video card, fuzzy monitor (or is that my eyesight?)
"When the facts change, I change my mind" - John Maynard Keynes
Post Reply