General XMetaL Discussion

  • jrob61

    toolbar positioning

    Participants 0
    Replies 1
    Last Activity 8 years, 9 months ago

    XMetaL Author Essential 8.0.0.038

    What is the proper way to position a commandbar and have it hold the next time you log into XMetaL?  We have followed the code example regarding top, left, bottom, and default with limited luck.  We also tried the following within the .mcr file by using .Position in the On_Default_CommandBars_Complete macro:

    Application.CommandBars.item(“Standard”).Position = 2;
    Application.CommandBars.item(“Menu bar”).Position = 2;

    But the menu bar and toolbar continue to float and when we check the position with an Application.Alert the position continues to be 5 even though it was just set to 2.

    The only reason we are setting this, is to save the user time, because randomly the toolbars and menus float when xmetal is opened.  The user can manually move them to the top.  But if the workspace is cleared out or something, the menu and toolbars are floating when xmetal is reopened and the user has to readjust the positioning.

    Reply

    Derek Read

    Reply to: toolbar positioning

    You can create a new toolbar that is docked to the top toolbar area using code similar to this:

    // XMetaL Script Language JSCRIPT:
    // create a command bar docked at the top of the UI
    Application.CommandBars.Add("My Toolbar",2);

    That is working in the current release (8.0.1.051) as are the values 3 (right), 4 (bottom), and 5 (floating / default).
    The value 1 (dock on the left side) does not seem to work in 8.0 UI and results in a floating toolbar for me. I'll raise this with development.

    I believe the Position property you are using has not been implemented and has no effect. I'll check with development on this. It could be that the documentation is incorrectly listing it.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support