Hiding Menu Items

  1. ‹ Older
  2. 4 months ago

    Tim P

    Mar 9 Pre-Release Testers, XDC Speakers

    @Graham B If the property is not available on windows why does it still hide the menu item? (and change the look and feel of the menu bar)

    All I can tell you the docs state that it's not available. I misunderstood your post the first time I read it.
    http://docs.xojo.com/index.php/MenuItem.Visible

    But now that I do understand it sounds like you're having an issue with an unsupported property.

  3. Christian S

    Mar 9 Pre-Release Testers, Xojo Pro, XDC Speakers Germany

    Xojo rebuilds the menu for you without the invisible ones.
    And the rebuild menu is in older style.

  4. Graham B

    Mar 9 Pre-Release Testers, Xojo Pro The Canada's

    So the only way around this would be to remove the menu item, keeping a local property to stop the menu item being cleaned up, and then inserting it back in when it needs to be shown.

  5. Christian S

    Mar 9 Pre-Release Testers, Xojo Pro, XDC Speakers Germany

    No, you could have two menu bars and switch between them by assigning window.menubar property.

  6. Tim P

    Mar 9 Pre-Release Testers, XDC Speakers
    Edited 4 months ago

    @Graham B So the only way around this would be to remove the menu item, keeping a local property to stop the menu item being cleaned up, and then inserting it back in when it needs to be shown.

    I would say that's a terribly confusing user experience. You should not modify a menus items once they're presented to the user. Enabling and disabling as necessary, sure. But removing and adding adds to confusion, and means they can't locate items easily.

    There is an alternative way of swapping menubars on the fly, but then you'll have different menubar objects in your project for different states of the menus. I don't recommend the alternative, but it's available.

    Edit: Beaten by just a few seconds! I included my opinion on how you're handling the menus though.

  7. Graham B

    Mar 9 Pre-Release Testers, Xojo Pro The Canada's

    We have a lot of menu items, having two menus (would actually have to be 4 to support the preference driven options) would be a nightmare to code the handlers against.

    Hiding and showing menu's is only down based on preferences or current registrations, it's not happening constantly. Not sure why you are saying it such a bad item, don't Microsoft automatically hide menu items in office? that being said that was awful.

    I think adding and removing them is the only way to go, as there are only a few items to manage.

  8. Michel B

    Mar 9 Pre-Release Testers RubberViews.com

    You can also disable them.

  9. Jeff T

    Mar 9 Midlands of England, Europe

    How about change the text to "-" making them into separators?

  10. Christian S

    Mar 10 Pre-Release Testers, Xojo Pro, XDC Speakers Germany

    A good menu shows all the items and only disables what is currently not available.

    Only if you switch from one part of the app to another, e.g. from spreadsheet to word processor in Office app, you get a new menu.

  11. Markus W

    Mar 10 Pre-Release Testers, Xojo Pro #JeSuisHuman Germany, Heidelb...

    @ChristianSchmitz Xojo rebuilds the menu for you without the invisible ones.
    And the rebuild menu is in older style.

    Isn't that what's usually called a bug? And therefore he should open a feedback report?

  12. Christian S

    Mar 10 Pre-Release Testers, Xojo Pro, XDC Speakers Germany

    of course @Graham B could report the behavior as a bug/problem.

    But if Windows doesn't allow to hide existing menu items and you need to rebuild the menu, it could be called a bug to use older style.

  13. Michel B

    Mar 10 Pre-Release Testers RubberViews.com

    AFAIK you can hide menuitems in the enableMenuItem event only.

  14. Markus W

    Mar 10 Pre-Release Testers, Xojo Pro #JeSuisHuman Germany, Heidelb...

    Btw what happens if you set MenuItem.Enabled as well? See bug report Feedback Case #33462

  15. Emile S

    Mar 10 Europe (France, Strasbourg)
    Edited 4 months ago

    I just set a MenuItem as disabled (in App.EnableMenuItem) because the feature is not "public" ready.

    Works fine on macOS (appears disabled), but I do not have a Windows machine handly (now) to test it, yet.

    Edit: typo.

  16. Anthony C

    Mar 10 Pre-Release Testers, Xojo Pro GraffitiSuite Developer
    Edited 4 months ago

    I've got to get out my pitchfork here. Swapping menus around (hiding/showing/removing) on Windows windows (windows windows windows) is just a terrible thing.

    As others have said, it creates a confusing interface for users. The proper way is always to Enable/Disable. It's better that a user question why the item is disabled and look for an answer, than realize what they're looking for has just magically disappeared with no reason. At that point they can lose trust in the UI.

  17. Anthony C

    Mar 10 Pre-Release Testers, Xojo Pro GraffitiSuite Developer
    Edited 4 months ago

    That said, this does appear to be a bug, and the discussion isn't about UI best practices. I would report this issue in Feedback.

  18. Julian S

    Mar 10 Pre-Release Testers, Xojo Pro UK

    The only way is to Clone it into a temporary MenuItem then Remove it and Insert it back in when you want it shown. That is the way its done according to MSDN, there is no hide flag in windows.

    Seems odd that the framework doesn't just wrap all that up for you or they tried and found a problem and just left it where it was producing that odd looking menu.

  19. Graham B

    Mar 12 Pre-Release Testers, Xojo Pro The Canada's

    I added a feedback Feedback Case #51582 on friday

    I ended up keeping hold of them in memory and adding them back in the correct location as needed.

    I am not sure why some people are staying that hiding menus is the worst thing in the history of the world. A lot of applications have preference / registration based menu items that are shown and hidden as you use the applicaiton. Eg chromes developer menu item.

  20. Tim P

    Mar 12 Pre-Release Testers, XDC Speakers

    I am not sure why some people are staying that hiding menus is the worst thing in the history of the world. A lot of applications have preference / registration based menu items that are shown and hidden as you use the applicaiton. Eg chromes developer menu item.

    Those are different applications of the ability to hide the menu item.

    The screenshot you posted shows you hiding Export Orders and Clear All Orders. These should not be hidden and shown based on selection, enable/disable is the way to handle those.

    A registration menu item can be hidden once the app is registered, and never returned.
    Chrome's developer menu is specific to developers, so it's hidden from the average user until it's enabled.

    Do you see the difference? If you don't you should brush up on some User Experience basics.

  21. Graham B

    Mar 12 Pre-Release Testers, Xojo Pro The Canada's

    Sorry but my screenshots did not show me hiding those menu items, they merely showed the difference in styles because there is a hidden menu item in the orders menu. We have plugins to a third party application which is enabled in the preferences. This sits under the order menu and has been removed, exactly the same concept as the developer menu.
    Export orders and clear all orders are disabled, never hidden. So I think you have misunderstood my sample screen shots there.

    We allow activation and deactivation of our software and you can update your registrations at any time, so hiding and showing of these are handled dynamically.

or Sign Up to reply!