March 28, 2024, 11:24:35 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Accelerator Keys

Started by Brian, July 28, 2013, 04:10:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

Hi,

If you have a menu item, ie, Control P to print a file, you can have an accelerator, thus:
ADDACCELERATOR win,@FCONTROL|@FVIRTKEY,ASC("P"),100
(the control number points to the menu item)

Now what if you also have a button that serves the same function? If you put in a line like:
ADDACCELERATOR win,@FCONTROL|@FVIRTKEY,ASC("P"),200
(the control number points to the button)

Which control is it going to pick up - will there be a mismatch problem? How do we know
which control number is going to be used? How do we get round this?

Brian

LarryMc

From everything that I read ADDACCELERATOR is only for menu items

accelerators are handled through
case @idmenupick
select @menunum

controls are processed through
case @idcontrol
select @controlid

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library