[DUG] Mainform ActionList keyboard shortcuts from other forms
Ross Levis
ross at stationplaylist.com
Mon Feb 4 23:12:47 NZDT 2013
I have noticed you can assign event properties in another form to an action
on the mainform, but in this case there is no component in each form to
assign each action, so not relevant in this case.
I suppose I could put a hidden menu on each form and assign menu items to
each of the actions on the mainform. But rather messy.
From: delphi-bounces at listserver.123.net.nz
[mailto:delphi-bounces at listserver.123.net.nz] On Behalf Of Kyley Harris
Sent: Monday, 4 February 2013 8:49 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Mainform ActionList keyboard shortcuts from other forms
from what I'm aware, and you can look at the source to confirm, but any
action in an action list on the main form are handled by all forms. the
action call back code checks the active form, before asking the mainform to
test it.
I have just added basic edit cut,copy paste actions to my main form and have
a single popup menu on the main form, which i dynamically bind to all edit
controls in the app. its working perfectly
On Mon, Feb 4, 2013 at 8:00 PM, Ross Levis <ross at stationplaylist.com> wrote:
What would be the easiest method to get some shortcuts that are defined in
an Actionlist on the mainform to work when another form has the focus?
I have code to set the ShortCut number in the Actionlist based on user
settings.
I believe I can use TApplication.OnShortCut and manually check for keys
pressed. Is that the best method? It will mean duplicating code as I still
need the ActionList for some associated buttons and menu items.
Ross.
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi at listserver.123.net.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request at listserver.123.net.nz with
Subject: unsubscribe
--
Kyley Harris
Harris Software
+64-21-671-821
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20130204/ffd0f21d/attachment.html
More information about the Delphi
mailing list