Intersoft WebDesktop Documentation
Configuring ToolCommand Toolbar Merging
See Also Send Feedback
Intersoft WebDesktop > WebToolBar > Tutorials > Configuring ToolCommand Toolbar Merging

Glossary Item Box

Objectives

If you have a main WebToolBar in a page and an IFrame that has its own WebToolBar, you can merge the ToolCommand of both WebToolBar. This tutorial provides you a step-by-step guidance to merge ToolCommands of a WebToolBar to another WebToolBar.

  1. Create a parent page, for example : ParentWindow.aspx.
  2. In ParentWindow.aspx, drag PlaceHolderManager from ToolBox into WebForm.
  3. Drag WebToolBar from ToolBox into the PlaceHolderManager. Set the ID property to WebToolBar1.



  4. In Commands property, add ToolCommand Collection in ToolCommand Collection Editor. Click here for further information on how to define a ToolCommand. Add five Button ToolCommand (New, Open, Save, Print, Refresh) and two Container ToolCommand (Container1, Container2) in ToolCommand Collection Editor. Set the sequence of the ToolCommands like the screenshots below.





  5. The WebToolBar in ParentWindow.aspx will look like the screenshot below.

  6. Create another page, for example : srcFile.aspx.
  7. In srcFile.aspx, drag WebToolBar from ToolBox into WebForm. Set the ID of the WebToolBar as WebToolBar1.
  8. In Commands property, add ToolCommand Collection in ToolCommand Collection Editor. Add three Button ToolCommand (Home, Help, Inbox).
  9. Set the MergeCommandID of the ToolCommands.

    Name MergeCommandID
    Home Container2
    Help Container1
    Inbox Container1






  10. In srcFile.aspx, display the property window for WebToolBar1. Set the following properties.

    Property Value
    MergeToolBar True
    MergeToolBarParentID WebToolBar1




  11. The WebToolBar in srcFile.aspx will look like the screenshot below.


  12. In ParentWindow.aspx, add an IFrame and set the source property to srcFile.aspx.

    Script Copy ImageCopy Code
    <iframe src="srcFile.aspx"></iframe>
    

  13. Compile and run the application.



Help and Inbox ToolCommand from srcFile.aspx is placed in the Container1 ToolCommand of ParentWindow.aspx and Home ToolCommand from srcFile.aspx is placed in Container2 ToolCommand of ParentWindow.aspx.

See Also

© 2012 Intersoft Solutions Corp. All Rights Reserved.