Divelements Community
Customer discussion of all Divelements products

AddToolbar/RemoveToolbar

Latest post 06-29-2007 14:32 by David Welsh. 5 replies.
  • 06-27-2007 18:51

    AddToolbar/RemoveToolbar

    I am trying to use these SandBar methods during run-time. But I am unable to get either to work.

    Any thoughts?
  • 06-28-2007 14:32 In reply to

    Re: AddToolbar/RemoveToolbar

    Can you expand on "get them to work"? If you expected something visual to occur, you'll be disappointed. Those methods do nothing except register or unregister a toolbar with the SandBar layout system prior to deserialization of a saved toolbar layout.

    If you want to dynamically add a toolbar to your layout, just add it to the Controls collection of the ToolBarContainer you want (probably the top one).

    I hope this helps.
  • 06-28-2007 17:19 In reply to

    Re: AddToolbar/RemoveToolbar

    I was just working with adding them directly to to the controls collection of the ToolBarContainer.

    But uisng this prevents the Layout from controling the toolbars last toolbarcontainer.

    In this case, I have plug-ins dyanmically creating toolbars. On the first load of the plugin, it needs to add the toolbarcontainer directly. This allows it to be saved out to a layout file. But on non-first loads of the plug-in, I would need to register the toolbar, so the layout work correctly.

    Have I got that part correct, or am I going at this worng?
  • 06-28-2007 20:12 In reply to

    Re: AddToolbar/RemoveToolbar

    On the first load of your plugin you should add directly to the Controls collection of the ToolBarContainer, which will implicitly register the toolbar. Otherwise just call the AddToolBar method.

    Is this not working?
  • 06-28-2007 20:50 In reply to

    Re: AddToolbar/RemoveToolbar

    I am having diffuculty using the AddToolbar then applying a Layout file. But before I say its the control, I am reexamining my code again.

    I have layouts working perfectly with SandDock.

    Plug-in windows load to their last locations, when the app shutdown last.

    Just trying to get the same out of the SandBar.

  • 06-29-2007 14:32 In reply to

    Re: AddToolbar/RemoveToolbar

    I found my problem. This is working correctly.

    Thank you for clearing up the use of AddToolbar/removetoolbar methods.

Page 1 of 1 (6 items) | RSS
Copyright © 2008 Divelements Limited
Powered by Community Server (Commercial Edition), by Telligent Systems