It is currently Tue Mar 31, 2020 11:18 am

All times are UTC + 1 hour

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Form Designer doesnt allow '+' or '-' in keyboard Shortcuts
PostPosted: Sat Jan 09, 2016 8:31 am 
User avatar

Joined: Thu Jun 04, 2015 7:10 am
Posts: 1672
Using + as the Shortcut results in the following code which prevents compile:
AddKeyboardShortcut(#Window0, #PB_Shortcut_ | #PB_Shortcut_, #menuitem)

Im assuming its parser is at fault when looking for combinations, eg "Ctrl+A", but + is of course a valid key and should map to #PB_Shortcut_Add

- also fails:
AddKeyboardShortcut(#Window0, #PB_Shortcut_-, #menuitem)
#PB_Shortcut_- doesnt exist, and should map to #PB_Shortcut_Subtract

My ungainly but effective workaround is to remove the Shortcut from the menu item in the designer, and manually reset menu text (required to add the $Tab + Shortcut part) and manually add the keyboard shortcut in my startup code:
  SetMenuItemText(0,#mnuZoomIn, "Zoom In"+#TAB$+"+")
  AddKeyboardShortcut(#Window0, #PB_Shortcut_Add, #mnuZoomIn)

Thankyou to all the coders who generously helped & encouraged me in the nearly 2yrs when i was welcome here,
it was a tremendous privilege. I learned a lot. I wish you and your families all the best and success for the future.

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye