1. Subrat patra
  2. PowerBuilder
  3. Saturday, 17 August 2024 17:25 PM UTC

Hi Team, 

i have a menu, for which the menu items are added dynamically. So for a particular menu item, I want to add submenu items.So I find out the menu item text dynamically and if that condition is true I am enabling and making visible True. Else these submenu items will be invisible. So for all other screens wherever this menu is used ,then in those cases next to the menu item index number the submenu link is visible, although the submenu items are invisible. I want to know how to make that invisible too.

Thanks

Subrat

John Fauss Accepted Answer Pending Moderation
  1. Saturday, 17 August 2024 20:52 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Subrat -

I'm not 100% sure I clearly understand your issue, but I'll take a stab at it.

Have you considered using right-click (popup) menus instead of customizing the main menu? I think this would be the best way to provide access to options that are unique to each (sheet) window. This would be simpler to code and in general, most users are accustomed to them.

An alternative would be for each sheet window to utilize its own menu, which can be inherited from the MDI (frame) menu.

However, in order to dynamically change the contents of and the items listed in a main/frame menu as each sheet window becomes active (receives user focus), then you will need to manage this in each sheet window's Activate event script.

Best regards, John

Comment
There are no comments made yet.
Subrat patra Accepted Answer Pending Moderation
  1. Wednesday, 21 August 2024 06:05 AM UTC
  2. PowerBuilder
  3. # 2

Hi John,

Thank your reply. Sorry, I didn't frame my question properly. I want to make the arrow mark invisible in some conditions where I don't have to show any submenu items. Currently, in some situations the submenu items are not visible then also the arrow mark is visible.

 

I hope you now understand my question. Please make suggestions.

 

Regards

Subrat

Attachments (1)
Comment
  1. John Fauss
  2. Wednesday, 21 August 2024 13:34 PM UTC
Menu rendering (drawing) is performed by the Windows operating system, and it draws the right-pointing arrow symbol to indicate the existence of any cascaded menu items, whether they are VISIBLE or not. In other words, the arrow will be shown even if you Disable and Hide all cascaded menu items under it (I tried doing this in a quick test).

Having a menu item that sometimes cascades and sometimes does not cascade is not, IMHO, good user interface design because the user does not know how the menu will behave. This is likely why Windows always displays the cascade arrow whenever any cascaded menu items are defined.

If menu item "9" in your above example has no visible cascaded menu items, then I think you should also hide menu item "9".
  1. Helpful 2
  1. Chris Pollach @Appeon
  2. Wednesday, 21 August 2024 13:50 PM UTC
Hi John;

I agree 100% - IMHO you should never try & defeat standard O/S behaviour. That also goes in reverse .. your PB Apps should always be designed to tap into standard O/S behaviour. App users are typically "creatures of habit" thus, you should never introduce negative GUI behaviour. That also goes for new App users that will expect this standard GUI behaviour. Just my $0.02.

Regards ... Chris
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.