Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » just looking for a basic arrayctrl example please
just looking for a basic arrayctrl example please [message #8323] Fri, 02 March 2007 18:30 Go to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
something that shows how to initialise and fill it with data (and maybe some colour buttons or something like that)

[I have an array of structs which have int,string,color,double so thats why i wanna use this ctrl but I cant find any basic howto]

thanks

nick
Re: just looking for a basic arrayctrl example please [message #8324 is a reply to message #8323] Fri, 02 March 2007 18:44 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Ok, I found the example AddressBook but this really avoids the whole area of what the arrayctrl is meant to be able to do. There is no inplace editing, no droplists or colour buttons or any of the things that are touched on so briefly but tantalisingly in the documentation.

Does anyone have example code for the arrayctrl which appears in the documentation - the one with the little color boxes? I want to be able to display the colour attributed to each record and to change a value associated with it. Its not at all clear to me whether I implement everything myself or whether its possible to do it all with built in functionality.

cheers,

nick

Do I need to use the Gridctrl instead?

[Updated on: Fri, 02 March 2007 19:48]

Report message to a moderator

Re: just looking for a basic arrayctrl example please [message #8325 is a reply to message #8324] Fri, 02 March 2007 21:15 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
nixnixnix wrote on Fri, 02 March 2007 18:44

Ok, I found the example AddressBook but this really avoids the whole area of what the arrayctrl is meant to be able to do. There is no inplace editing, no droplists or colour buttons or any of the things that are touched on so briefly but tantalisingly in the documentation.

Does anyone have example code for the arrayctrl which appears in the documentation - the one with the little color boxes? I want to be able to display the colour attributed to each record and to change a value associated with it. Its not at all clear to me whether I implement everything myself or whether its possible to do it all with built in functionality.

cheers,

nick

Do I need to use the Gridctrl instead?


Hi,

this thread http://www.ultimatepp.org/forum/index.php?t=msg&th=234&a mp;start=0& deal with the color of the cell. There is even a working example that show how to use the Display class. Let us know if it is useful.

Luigi
Re: just looking for a basic arrayctrl example please [message #8326 is a reply to message #8325] Fri, 02 March 2007 22:08 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Yes thanks, with addition of

ink = paper = (Color)q;

In PaintBackground() and Paint() overrides, I can now make a Color value field display as a filled rect of that color Smile

Now I just need to work out how to edit a value - saw it somewhere....
Re: just looking for a basic arrayctrl example please [message #8327 is a reply to message #8326] Fri, 02 March 2007 22:22 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
nixnixnix wrote on Fri, 02 March 2007 22:08

Yes thanks, with addition of

ink = paper = (Color)q;

In PaintBackground() and Paint() overrides, I can now make a Color value field display as a filled rect of that color Smile

Now I just need to work out how to edit a value - saw it somewhere....


There is the package ArrayCtrlEdit in reference.

Luigi
Re: just looking for a basic arrayctrl example please [message #8331 is a reply to message #8323] Sat, 03 March 2007 09:49 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
nixnixnix wrote on Fri, 02 March 2007 12:30

something that shows how to initialise and fill it with data (and maybe some colour buttons or something like that)

[I have an array of structs which have int,string,color,double so thats why i wanna use this ctrl but I cant find any basic howto]

thanks

nick


OK, I have added one for you:

http://www.ultimatepp.org/reference$ArrayCtrl.html

MIrek
Re: just looking for a basic arrayctrl example please [message #8334 is a reply to message #8323] Sat, 03 March 2007 11:00 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 697
Registered: December 2005
Location: Budapest, Hungary
Contributor
and if you need coloring only, AttrText will be useful also.
You can put it to arrayctrl as value.
Re: just looking for a basic arrayctrl example please [message #8382 is a reply to message #8331] Tue, 06 March 2007 17:07 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Nice example - thanks! What about adding it to the examples page? I can't be the only dumbass who would appreciate that.

Nick
Re: just looking for a basic arrayctrl example please [message #8419 is a reply to message #8382] Thu, 08 March 2007 14:17 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I posted you a link to examples page Smile

Mirek
Previous Topic: GridCtrl and sort at runtime
Next Topic: Wrong display in arrayctrl
Goto Forum:
  


Current Time: Thu Apr 25 18:48:16 CEST 2024

Total time taken to generate the page: 0.04698 seconds