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 » Community » Newbie corner » Help needed to program an array ctrl.
Re: Help needed to program an array ctrl. [message #28454 is a reply to message #28337] Thu, 02 September 2010 13:02 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Javier,

Since no one more skilled answered yet, it looks like I will have to do it Smile

1) I assume you already has the struct ready, it is really simple.

2) You should decide wheather you want to use the ArrayCtrl just for displaying the state of Layers, or if you actually want to use it to modify them as well. I guess it is more user friendly to have the actual controls in the ArrayCtrl, similar to e.g. Layers dialog in photoshop.
a,e) This is simple, just have a look to reference/ArrayCtrl*
b,d) I would use a Button, changing image in the WhenAction callback, possible also set same color as background and no frame, to make it look better.
c) I think you don't need separate switch, you can use the layer that is currently selected in ArrayCtrl as the active one.

3) You can choose many strategies... In some cases it is enough to have the informations in ArrayCtrl alone and access them when necessary. In other cases, especially when you need to pass the layers list somewhere etc., you have to either re-create (part of) the ArrayCtrl everytime the underlaying Vector<Layer> changes, or you can make a function that gathers all the values from ArrayCtrl and creates the Vector<Layer> which can be done worked with further. This depends a lot on your actual needs...

I will try to put together some basic code and post it up here for you later if I have some spare time...

Best regards,
Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Several options: what to use?
Next Topic: Problems in growing up from newbie
Goto Forum:
  


Current Time: Mon Jun 10 16:44:15 CEST 2024

Total time taken to generate the page: 0.01843 seconds