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 |
|
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
|
|
|
|
|
Styles and Widgets
By: WebChaot on Wed, 14 March 2007 12:15
|
|
|
Re: Styles and Widgets
By: mirek on Wed, 14 March 2007 14:54
|
|
|
Re: Styles and Widgets
By: WebChaot on Wed, 18 April 2007 11:24
|
|
|
Re: Styles and Widgets
By: mirek on Wed, 18 April 2007 12:02
|
|
|
Re: Styles and Widgets
By: mrjt on Wed, 18 April 2007 12:24
|
|
|
Re: Styles and Widgets
By: WebChaot on Thu, 15 March 2007 09:14
|
|
|
Re: Styles and Widgets
By: mirek on Thu, 15 March 2007 12:11
|
|
|
Re: Styles and Widgets
By: WebChaot on Thu, 15 March 2007 12:39
|
|
|
Re: Styles and Widgets
By: mirek on Thu, 15 March 2007 14:59
|
|
|
Re: Styles and Widgets
By: WebChaot on Wed, 18 April 2007 12:08
|
Goto Forum:
Current Time: Tue May 07 18:50:23 CEST 2024
Total time taken to generate the page: 0.03242 seconds
|