LB Booster
General >> General Board >> Menu
http://lbb.conforums.com/index.cgi?board=general&action=display&num=1500427028

Menu
Post by PabloSl on Jul 19th, 2017, 01:17am

Hello,

When I run my program, while I press the Alt key, the menu bar do not shows proper pull-down menu letter marked with a &.

Like the 'F' in &File, or 'H' in &Help should show underline letter.

This happens with LBB 3.07 and 3.08 under Windows 7 64-bit spanish.

TIA,

-Pablo
Re: Menu
Post by Richard Russell on Jul 19th, 2017, 09:11am

on Jul 19th, 2017, 01:17am, PabloSl wrote:
When I run my program, while I press the Alt key, the menu bar do not shows proper pull-down menu letter marked with a &.

That's interesting. It normally works but I have noticed an anomaly that may explain what you are seeing. If the window contains no child controls at all then for some reason the Alt underlines don't appear! Adding just a single control makes it work, so for example in this program the accelerator highlighting does work correctly:

Code:
    nomainwin
    button #w, "Close", [quit], LL, 130, 10
    menu #w, &File, &Load, [FileLoad], &Save, [FileSave], E&xit, [quit]
    menu #w, &Edit, Cu&t, [EditCut], &Copy, [EditCopy], &Paste, [EditPaste]
    open "Menu Accelerator Test" for window as #w
    #w "trapclose [quit]"
    wait

[quit]
    close #w
    end 

But if I comment out the Close button the Alt underlines no longer appear! I have no idea why; it will require some investigating. Fortunately the actual menu accelerators continue to work, it's only the highlighting that doesn't.

Richard.

Re: Menu
Post by PabloSl on Jul 19th, 2017, 9:30pm

Wow! That's impresive. You are a very CLEVER guy!

Thank you so much.

-Pablo
Re: Menu
Post by Richard Russell on Jul 19th, 2017, 10:54pm

on Jul 19th, 2017, 9:30pm, PabloSl wrote:
Thank you so much.

FWIW I have discovered why the menu accelerators are not always highlighted correctly when the Alt key is pressed. I will fix this in the next release of LBB.

Thank you for reporting this issue, which I wasn't previously aware of (it happens only in relatively unusual circumstances, such as a window with no child controls or when a graphicbox has input focus).

Meanwhile the menu accelerators do continue to work correctly, even when the Alt-key highlighting doesn't.

Richard.