Accessing Custom Toolbars
Hi all
BDS 2006; RB 10
What is the easiest way to access custom added toolbars. We added a new
toolbar using:
TppToolbarFactory.Register(StylingToolbar)
We need to enable/disable the styling dependent on selections in the
designer. What is the easiest way to access the toolbar. The best i have
found is getting the toolbar manager like this:
ToolbarManager :=
TppDesignerWindow(ReportDesigner.Form).LayoutManager.ToolManager
But that is not really pretty. Any better way?
Thanks in advance
Steffen
BDS 2006; RB 10
What is the easiest way to access custom added toolbars. We added a new
toolbar using:
TppToolbarFactory.Register(StylingToolbar)
We need to enable/disable the styling dependent on selections in the
designer. What is the easiest way to access the toolbar. The best i have
found is getting the toolbar manager like this:
ToolbarManager :=
TppDesignerWindow(ReportDesigner.Form).LayoutManager.ToolManager
But that is not really pretty. Any better way?
Thanks in advance
Steffen
This discussion has been closed.
Comments
Take a look at the following example. It gives a few good examples on how
to manage and customize the new toolbars for RB 10.x. From your code below
it looks like you have the basic idea. It is possible to split that code up
using local varialbes to make it more readable as shown in the example.
http://www.digital-metaphors.com/tips/Designer10_CustomizeMenusAndToolbars.zip
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Great examples, and it now work... almost. The combobox does not change when
I set an ItemIndex.
From my debugging it looks like I need a viewer, but I have not been able to
find out where I should add this one.
Any help would be appreciated.
Best regards
Steffen
Which combobox are you speaking of? Is this the font combobox of the format
toolbar or something else?
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
ItemIndex nothing happens. It is of type: TppDesignComboBoxToolItem.
When debugging this issue the TppTBXCustomList.SetItemIndex is called. It
only executes part of the code, if a viewer is attached.
How should a viewer be attached, or is there a better way to syncronize the
content on custom toolbars with the current selection?
Best regards
Steffen
We also encountered some issues getting the TBX combobox to work properly.
Note that in the TppEditToolbar.CreateItems method we call the Loaded
method. This was necessary to get the control to initilialize itself.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Any other ideas?
Try setting the Text property of the combobox rather than the ItemIndex.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
As always you supply excellent help.
Keep up the good work.
Steffen