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 » Look and Chameleon Technology » Styles and Widgets
Re: Styles and Widgets [message #8498 is a reply to message #8495] Wed, 14 March 2007 14:54 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
WebChaot wrote on Wed, 14 March 2007 07:15

Hi all!

I made some new components and changes in a previous version (610 dev 1). This week my collegue downloaded the last release (2007) and I saw, that some changes are done on chameleon technology.

1. I have to paint some widgets by code. Is there any example, how to do this in the new way (Style().Write() ??)?



It is not really too much different.

There were two reason to changes things:

"index based" method of working with style became to be overly complicated, therefore we changed indicies for structures. Usually, those structures are pretty easily understandable.

If you had any code based on indicies, conversion to structures should be pretty straightforward, usually there is one structure data fiels per former index...

While being at it, structures also provide a good way how to allow per-thread customization. So you can either assign a reference to the style for individual widget, or you can use "Write" to change the style for the whole class.

Quote:


2. I didn't look in deep of new release. But what I missed in older version is a style for StatusBar and something for "CoolBar" (the docking panel where windows toolbars are placed). I know, there is still no CoolBar and no Docking ability in upp for now. But maybe the style could be included and for example be assigned on a dummy StaticRect or something else.



OK.

Quote:


3. I put also my third question here, but its not really a chameleon topic: I want create widgets at runtime. Creation is not the problem (I think) - but how to iterate over all widgets of a window for example?



Ctrl::GetFirstChild, Ctrl::GetNext

Quote:


How to detect its class?



RTTI if you really need to.

Quote:


The reason is simple: I have to collect input data of all edit fields - but because they are created by code I need a solution to iterate over all fields on a window.



Ah. Well, there are better solution to this. See DynamicDlg example. In nutshell, you can create widgets in container, e.g. ArrayMap. GUI never owns widgets, therefore you can still use them in the dialog, but use container to access individual editors.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: MenuItem Chameleon bug report & question
Next Topic: OS X Aqua look and feel?
Goto Forum:
  


Current Time: Tue May 07 18:50:23 CEST 2024

Total time taken to generate the page: 0.03242 seconds