Menu shortcuts?
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by freak.
What are you taking as MainWin ?
Is it the Value you get with WindowID(), or the one you use with OpenWindow like OpwnWindow(MainWin, ...
It has to be the one from Openwindow, the PureBasic Window Number, not the ID (or handle) it gets from Windows.
Maybe this causes the crash.
Timo
What are you taking as MainWin ?
Is it the Value you get with WindowID(), or the one you use with OpenWindow like OpwnWindow(MainWin, ...
It has to be the one from Openwindow, the PureBasic Window Number, not the ID (or handle) it gets from Windows.
Maybe this causes the crash.
Timo
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Naitfreak.
Yup! That caused the crash! I used the wrong value for the '#window' variable. It works now.
But how can I integrate the visual shortcut like "Crtl+N" into the actual graphical representaion of the menu? I mean it's not done by simply but this next to the name of the specific menu item when you create it. It will look pretty disordered and will remain on wrong places when the width of the menu changes. Like when you have recent file list in your menu.
Is that possible at all?
Yup! That caused the crash! I used the wrong value for the '#window' variable. It works now.
But how can I integrate the visual shortcut like "Crtl+N" into the actual graphical representaion of the menu? I mean it's not done by simply but this next to the name of the specific menu item when you create it. It will look pretty disordered and will remain on wrong places when the width of the menu changes. Like when you have recent file list in your menu.
Is that possible at all?
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Berikco.
use something like this
"New"+Chr(9)+"Ctrl+N"
Regards,
Berikco
http://www.benny.zeb.be/purebasic.htm
use something like this
"New"+Chr(9)+"Ctrl+N"
Regards,
Berikco
http://www.benny.zeb.be/purebasic.htm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Hi-Toro.
Use Chr (9) [tab] to separate the 'Ctrl X' strings, like this:
--
See ya,
James L Boyd.
http://www.hi-toro.com/
--
Use Chr (9) [tab] to separate the 'Ctrl X' strings, like this:
Code: Select all
OpenWindow (0, 320, 200, 320, 200, #PB_Window_SystemMenu, "Test")
CreateMenu (0, WindowID ())
MenuTitle ("&File")
MenuItem (1, "Open file..." + Chr (9) + "Ctrl O")
MenuItem (2, "Save file..." + Chr (9) + "Ctrl S")
MenuItem (3, "Read a really good book before going to bed..." + Chr (9) + "Ctrl R")
MenuItem (4, "Exit..." + Chr (9) + "Ctrl E")
Repeat
Until WaitWindowEvent () = #PB_Event_CloseWindow
End
--
See ya,
James L Boyd.
http://www.hi-toro.com/
--
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Kale.
The forum search gave me this, you should try the search function first, its very helpful
:
viewtopic.php?t=2571
--Kale
In love with PureBasic!
The forum search gave me this, you should try the search function first, its very helpful
viewtopic.php?t=2571
--Kale
In love with PureBasic!
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm