SetGadgetItemIcon()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Anden
Enthusiast
Enthusiast
Posts: 135
Joined: Mon Jul 21, 2003 7:23 am
Contact:

Post by Anden »

Not much difference there.

Maybe one of the control flags is the problem:

li_users_hnd = ListIconGadget(#users, 493, 28, 140, 325, "Users Online", 136, #PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection|#LVS_NOSORTHEADER|#PB_ListIcon_CheckBoxes)

#PB_ListIcon_CheckBoxes? (which is an icon itself and can be replaced too)

And there is a state and a stateMask member in the LVITEM structure (used with LVM_SETITEM).

Is the checkbox icon located in the "original" image list?
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

I don't think it is. A few people have addressed this issue in the past and it appears that the checkbox is a child window of the gadget itself so it *might* stand to reason that

But since I haven't used them for ages myself (or gone through MSDN for the details), couldn't tell you for sure.

You might put in a query to Freak, he would know.

Sorry to not be more help.
User avatar
Michael Vogel
Addict
Addict
Posts: 2798
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: SetGadgetItemIcon()

Post by Michael Vogel »

Does PB 4.40 already has such a function?

Using the API commands is not compatible with the PB commands, like AddGadgetItem(...,IconHandle) and also more complicate (sorting a ListIconGadget needs quite a lot of code, after ClearGadgetItems() the icon list has to be reassigned etc.)

A PB function to change an icon which has been assigned by PB would be fine 8)

Michael
Niffo
Enthusiast
Enthusiast
Posts: 504
Joined: Tue Jan 31, 2006 9:43 am
Location: France

Re: SetGadgetItemIcon()

Post by Niffo »

+1 : a (multi plateform) function to change an icon of an item of a ListIconGadget or a ComboBoxGadget is missing in PB

The already existing function SetGadgetItemAttribute() could/should be used for this action.
Niffo
jamirokwai
Enthusiast
Enthusiast
Posts: 796
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

Re: SetGadgetItemIcon()

Post by jamirokwai »

Hi,

please do not only add SetGadgetItemIcon() but also GetGadgetItemIcon(),
which could come in handy when sorting ListIconGagdets also. It's one of
my problems with a ListIconGadget atm, as I need to exchange whole lines
including the Image...

Thanks :-)
Regards,
JamiroKwai
Post Reply