Home Image-Pro Automation (Macros, Apps, Reports)
Options

CODE to CONTROL the SHOW OR HIDE TABS (RIBBONS) . . .

2023-05-08-145915

All --

I have a customer that would like to SIMPLIFY the IMAGE-PRO INTERFACE as much as possible.

If the SHOW OR HIDE TABS FEATURE of IMAGE-PRO is accessed with a RIGHT CLICK on a TAB as shown here


then if all of the TABS except for APPS are DESELECTED then IMAGE-PRO appears as shown here.



Is there a way to SELECT (SHOW) and DESELECT (HIDE) the TABS in IMAGE-PRO using CODE?

I turned on the RECORD MACRO and worked with the SHOW OR HIDE TABS and nothing appeared in the RECORDED MACRO.

It looks like it can be done with a LAYOUT FILE as shown below.

    Public Function NewMacro3() As SimpleScript
        NewMacro3 = New SimpleScript

        With Application.RibbonCommands.SelectRibbonTab(NewMacro3)
            .TabName = "View"
            .Run()
        End With

        With New LoadToolsLayout(NewMacro3)
            .FileName = "C:\Users\Owner\Desktop\111.Layout"
            .Run()
        End With

    End Function

Is there CODE that will SHOW or HIDE each TAB (RIBBON) individually?

Thanks.

-- Matt


Best Answers

  • Options
    Answer ✓
    Hi Matt,

    Show/hide tabs or groups are not recordable. I'll file a feature request to create commands.

    The information about hidden commands is stored in .Layout file. You can package predefined .Layout file with .ipx file a load it then IP or app stars.

    Thanks,
    Nikita.
  • Options
    Answer ✓
    Matt,

    Another solution is to hide all tabs in the options:


    Thanks,
    Nikita.

Answers

  • Options
    2023-05-08-155857

    Nikita --

    Thank you for your response.

    I will use the

            With New LoadToolsLayout(NewMacro3)
                .FileName = "C:\Users\Owner\Desktop\111.Layout"
                .Run()
            End With

    with appropriately created LAYOUT FILES for the ADMINISTRATOR and OPERATOR in this version of the APP.

    Thanks again.

    -- Matt


  • Options
    2023-05-08-165825

    Nikita --

    I tried using CODE similar to

            With New LoadToolsLayout(NewMacro3)
                .FileName = "C:\Users\Owner\Desktop\111.Layout"
                .Run()
            End With

    And there was a BIG issue regarding whether the APP was showing when the LAYOUT FILE was created.

    I came back into the FORUM to report my findings and saw your suggestion about the
    • FILE
    • OPTIONS
    • DISPLAY
    • RIBBON TABS
    • HIDE TABS
    I recorded using the HIDE TABS option generating CODE similar to

                    With Application.ApplicationCommands.SetOption(Nothing)
                        .Section = "Customization"
                        .Key = "HideTabs"
                        .Value = False
                        .Run()
                    End With

    I have two versions of this CODE.  One with

                        .Value = False
    

    for the OPERATOR MODE that needs LIMITED RIBBONS and one with

                        .Value = True
    

    for the ADMINISTRATOR MODE that needs ALL RIBBONS.

    Thank you for both responses.

    I know more about the LAYOUT FILES and the HIDE TABS now.

    -- Matt
Sign In or Register to comment.