Designer question |
Post Reply |
Author | |
JSram
Groupie Joined: 22 October 2004 Status: Offline Points: 42 |
Post Options
Thanks(0)
Posted: 27 October 2004 at 6:17am |
I have a question regarding working with the designer vs. code layout,
and thought I better know before getting too deep into it.
When using the designer to layout menu and other toolbars, are there any restrictions to how this can be further manupulated in code? I'm thinking of such things as changing Captions and icons. Like with the SplitButtonPopup, I want the icon of the button part to be one of the items shown in the dropdown, and this may change depending either a user setting or last selected item? Also can parts of the layout be down in the designer and then more controls or toolbars be added by code, or is it one or the other way? Thanks. |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
With the new XML feature, you can create a CommandBar entirely in code
and then export it as a XML file. You can then open the XML file
up in the Designer Studio. Youc can even create the CommandBar in
Designer Studio, export as XML file, load in project, then add controls
via code and then export the new layout as a new XML file. So as
you ca see, you can mix and match as you like.
|
|
ianp
Moderator Group Joined: 19 December 2003 Location: United Kingdom Status: Offline Points: 119 |
Post Options
Thanks(0)
|
hi supermario when i load an xml file, the icons don't seem to appear in the commandbars.icons collection, but they do appear in the collection when an xcb file is used. Is this correct behaviour |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Do you have SerializeImages enabled?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
ianp
Moderator Group Joined: 19 December 2003 Location: United Kingdom Status: Offline Points: 119 |
Post Options
Thanks(0)
|
yes, the images also appear in the commandbars when loaded from the xml file, but they just don't appear in the icons collection As a result I can't share the commandbars icons collection with the shortcut bar icons collection... |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Do you have SerializeDesignerControls enabled?
|
|
ianp
Moderator Group Joined: 19 December 2003 Location: United Kingdom Status: Offline Points: 119 |
Post Options
Thanks(0)
|
Yes...Here is the code I use to create the stateoptions
I then load the XML string with this StateOptions. Once I've done this, i then check the icons.count. However the icons object is not initialised (i.e. Is Nothing) Edited by ianp |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
You must save the XML file with SerializeDesignerControls = True. Then try to open it.
|
|
ianp
Moderator Group Joined: 19 December 2003 Location: United Kingdom Status: Offline Points: 119 |
Post Options
Thanks(0)
|
The xml file is created by exporting an xcb file from the command bars designer, is it possible to set these options from inside this app? |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Take a look at the Customizable sample to see how to do this. You
can simply load you xcb file in that sample, make sure
SerialiseDesignerControl is selected from the drop-down menu, then
export as xml.
|
|
ianp
Moderator Group Joined: 19 December 2003 Location: United Kingdom Status: Offline Points: 119 |
Post Options
Thanks(0)
|
I can replicate the same "little problem" in the customise sample:
However, if you load the xml file AFTER calling LoadDesignerBars the icons object is initialised |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
ok. right. call Options.UseSharedImageList = False before load xml. we add this method call automatically in next version. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
ianp
Moderator Group Joined: 19 December 2003 Location: United Kingdom Status: Offline Points: 119 |
Post Options
Thanks(0)
|
perfect, thanks. Should I reset the option after loading the XML file?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
no. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |