ListIcon FillByGadget

Share your advanced PureBasic knowledge/code with the community.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8425
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Gadget 1 is the combo box. It is the same control used on all the rows, so if it isn't cleared it will be set to show whatever was selected last time, which probably isn't desirable.

edit: thanks!
BERESHEIT
Marco2007
Enthusiast
Enthusiast
Posts: 638
Joined: Tue Jun 12, 2007 10:30 am
Location: not there...

Post by Marco2007 »

Excellent code :D , which I don`t understand :(

How can I create e.g. two different combos (col 3 + col 4)?

Wouldn`t it be good to add this for AllowLVedits? Well, would this be possible at all?

Sometimes I think it would be much more easier to learn chinese...
PureBasic for Windows
dige
Addict
Addict
Posts: 1247
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

Well done Netmaestro!
milan1612
Addict
Addict
Posts: 894
Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:

Post by milan1612 »

Nice one netmaestro :!:
Windows 7 & PureBasic 4.4
Marco2007
Enthusiast
Enthusiast
Posts: 638
Joined: Tue Jun 12, 2007 10:30 am
Location: not there...

Post by Marco2007 »

...SetGadgetItemColor(#Gadget, Eintrag, FarbTyp, Farbe [, Spalte])...isn`t working anymore :(

#LVS_OWNERDRAWFIXED?
PureBasic for Windows
jassing
Addict
Addict
Posts: 1745
Joined: Wed Feb 17, 2010 12:00 am

Re: ListIcon FillByGadget

Post by jassing »

Nice demo -- but one thing that could use tweaking is that when you select something, say "Toronto" and then move on -- it's fine -- but if you go back and click the combo again -- woa, what was my original choice? I'm sure it's easy to adjust & I'll get to it in time; but if someone had already addressed that one...
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4326
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Re: ListIcon FillByGadget

Post by Rook Zimbabwe »

ya know when NetMaestro and sRod get together... the result is whammo MAGIC!

Fantastic NetMaestro and great idea sRod... I plan to integrate this in the future! :mrgreen:
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
leodh
Enthusiast
Enthusiast
Posts: 164
Joined: Sun Nov 06, 2005 6:07 am
Location: Perth Western Australia

Re: ListIcon FillByGadget

Post by leodh »

Hi,

I am looking for a way to organise a lot of data that needs to be displayed to the screen.
This data may need to be edited sometimes and a listicongadget with a combobox in a cell looks just what I need.

I played with the code above but I can not figure out how to make only a few cells as comboboxgadgets.

Is there a way to have only selected cells as comboboxgadgets on the listicongadget

Thanks Leo
Regards
Leo
ebs
Enthusiast
Enthusiast
Posts: 530
Joined: Fri Apr 25, 2003 11:08 pm

Re: ListIcon FillByGadget

Post by ebs »

I know this is a fairly ancient post, but I just discovered it and it's almost exactly what I need.

My only issue is that the first column of the listicon has checkboxes, and I don't know how to "ownerdraw" them.
Is there any way to let Windows draw the first column?

Thanks,
Eric
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: ListIcon FillByGadget

Post by Kwai chang caine »

Yes very nice code, and apparently not see it before :oops:

I have just replacing

Code: Select all

EventType() = 1 by #PB_EventType_Change
EventID = #WM_CLOSE  by #PB_Event_CloseWindow
And delete "CreateGadgetList(WindowID(0))"

For that works fine here 8)
Thanks a little bit late for sharing 8)
ImageThe happiness is a road...
Not a destination
Post Reply