Flat Button and Menu

Can anyone please help with a small iritation I have with progress.

The following problem relates to when you define a button as flat.

If you place the cursor over the button, the button 'raises'.

With the button in this state you can't use the ALT+[menu-shortcut] to drop the menu.

This seems pretty much trivial except for when you have a toolbar of buttons. When we select an action using the button. It is very likely the mouse will stay there while the user enters information using the keyboard. When the user then wants to use a menu option, they are not able to without moving the mouse away from the previously selected button.

I have attached a .w as an example.

Is this a 'bug' with Progress and is there any way to get around this (other that when you click on a button, move the mouse away from the button).
 

Attachments

  • buttonandmenu.w
    8.2 KB · Views: 37

NickA

Member
Appears to be a 'feature'?!

Setting the 'FLAT-BUTTON' attribute forces 'NO-FOCUS'. It actually states in the online help:

Setting the FLAT-BUTTON attribute to TRUE forces the NO-FOCUS attribute to TRUE because the FLAT-BUTTON attribute only works with the NO-FOCUS attribute. Similarly, setting the NO-FOCUS attribute to FALSE forces the FLAT-BUTTON attribute to FALSE.

Why this is, I do not know, maybe it's a Microsoft 'feature'?

You could get around the problem by sticking something like the following in your main block:

Code:
ON 'ALT-B':U OF {&WINDOW-NAME} ANYWHERE DO:
    APPLY "CHOOSE":U TO BUTTON-1 IN FRAME {&FRAME-NAME}.
    RETURN.
END.

.. but that's a bit clumsy IMHO. Personally I'd put anything in my toolbar on a menu too, then hotkey off the menu item rather than the toolbar.. That's a look-and-feel that I've seen echoed across pretty much all Microsoft Windows product.

HTH
 
Top