Rohit wrote:
> If you disable a menu item say with shortcut ctrl-s, then another
> menu-item or button will not see ctrl-s.
Rohit is write, it's a 'feature' of the VCL, namely Menus.pas in the
interaction of TMenu.FindItem and TMenu.IsShortCut. Essentially,
TMenu.FindItem doesn't take into account the Enabled status when matching on
Shortcuts so it will always return the 'first' MenuItem of interest to push
into the MenuStack of things to Click. It then bails out later upon finding
the item is not Clicked.
So, I'd say it's either patch the VCL or remove/add your Shortcuts at
run-time by holding your own Shortcut repository and tracking the
enabled/disabled status.
TTFN,
Paul.
> To: Multiple recipients of list delphi
> <[EMAIL PROTECTED]>
> Send reply to: [EMAIL PROTECTED]
> Date sent: Tue, 14 Mar 2000 14:30:43 +1300
> From: [EMAIL PROTECTED]
> Subject: Re: [DUG]: Menu Shortcut Keys
>
> > Quoting Rohit Gupta <[EMAIL PROTECTED]>:
> >
> > > Did you solve this ? I dont have such problems, I use MDI
> > > extensively. What does happen is that some keys are reserved,
> > > locked inside win-apis. And the other bug is that a disabled menu
> > > item still usurps the key assigned to it. Ruddy brilliant design as
> > > usual. :-)
> >
> > What happens with a hidden menu item?
> >
> > The first time I used a menu to assign shortcuts, it was
> dynamically generated
> > depending on which part of the screen had the current focus. So
> much easier to
> > use popup menus for that :)
> >
> ------------------------------------------------------------------
> ---------
> > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> > Website: http://www.delphi.org.nz
>
>
>
> Rohit
>
> ======================================================================
> CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand
> PH (649) 489-2280
> FX (649) 489-2290
> email [EMAIL PROTECTED] or [EMAIL PROTECTED]
> ======================================================================
>
> ------------------------------------------------------------------
> ---------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz