` Printed Icetips Article

Icetips Article



Icetips Products: Hiding and unhiding menus based on condition
2004-03-26 -- Arnor Baldvinsson
 
Newsgroups: softvelocity.clarion.third_party

>    Using the Xplore template with C6, I see where you can Hide Popup
>Submenus, anyway i can hide a popup submenu based on a condition (an if
>statement), i.e.
>
>IF this then
>  hide submenu
>ELSE
>  unhide submenu
>END

Some of them you can.  Here is a message I wrote just over a month ago
about this subject:

Some of this you can do now already.

For example:

Xplore1.IgnoreHeaderPopup = True

will not show the header popup menu.

Xplore1.NoAddToPopup = True

will hide the whole Xplore popup menu.

You can actually fairly easily prevent the menu items to be created.
But you MUST do it before the Xplore.Init method is called.

Assign the following values to the XploreMaskA1 variable BEFORE the
XploreX.Init:

Hide NO menus               = 0
Hide Filters Sub-Menu       = 1
Hide Xplore Sub-Menu        = 2^1
Hide Output Sub-Menu        = 2^2
Hide Graph Menu Item        = 2^3
Hide Adjust Width Menu Item = 2^4
Hide Hide Column Menu Item  = 2^5

So to hide the whole show you could do:

XploreMaskA1 = 1 + |
              (2^1) + |
              (2^2) + |
              (2^3) + |
              (2^4) + |
              (2^5)

However this will still leave the Xplore menu because it is triggered
if any of it's submenus are active.  That again requires similar
settings for XploreMask1.

In C6 you might be able to do:

Xplore1.Rpu.DeleteMenu('XPS')

After the .Init call.

I may take a closer look at this and try to find a way to make this a
little bit more intuitive.

Best regards,

ArnĂ³r Baldvinsson



Printed November 23, 2024, 6:15 pm
This article has been viewed/printed 35254 times.
Google search has resulted in 21 hits on this article since January 25, 2004.