View Full Version : Menu Bar Shortcuts
dorkauf89
01-20-2008, 08:32 PM
Does anyone know how to do that shortcut things in a menu bar? Look at the attachment. Does anyone know how to do that on the right side? THanks
dorkauf89
01-21-2008, 07:27 PM
Anyone?????
RizlaUK
01-21-2008, 08:06 PM
you will need to setup hotkeys in the page timer
eg:
if System.IsKeyDown(17) and System.IsKeyDown(78) then
if not KillKey then
KillKey=true
Dialog.Message("Test","Ctrl + N Pressed")
KillKey=false
end
end
dorkauf89
01-21-2008, 08:16 PM
yea... I know that... But how do I put that text in the right side of the menu item? that tells you what the shortcut keys are... like in the print screen?
dorkauf89
01-23-2008, 02:54 PM
anyone knows??
dorkauf89
01-24-2008, 04:10 PM
Please help!
RizlaUK
01-25-2008, 06:14 AM
go in to the menu properties window and set the text then insets spaces !:rolleyes
dorkauf89
01-25-2008, 03:53 PM
no... cause then it makes the width of the menu longer and it is not at the side... it's at the middle... nice try but I tryed it... ANYONE?
RizlaUK
01-25-2008, 06:06 PM
well, i dont know about ams, but if a tab is used in pb (menu text) then the spaces are all the same and all aligned to right side, you will have to use "String.Char" and build your menu by code.
EDIT:
Yes it dose work like that, i just done a quick test with the below code in page onshow
-- Create a table containing all menu information
tblMenu = {};
tblMenu[1] ={};
tblMenu[1].Text = "&New Menu";
tblMenu[1].ID = 100;
tblMenu[1].Checked = false;
tblMenu[1].Enabled = true;
tblMenu[1].SubMenu = {};
tblMenu[1].SubMenu[1] = {};
tblMenu[1].SubMenu[1].Text = "&SubItem 1"..String.Char(9).."Ctrl+F";
tblMenu[1].SubMenu[1].ID = 101;
tblMenu[1].SubMenu[1].Checked = false;
tblMenu[1].SubMenu[1].Enabled = true;
tblMenu[1].SubMenu[2] = {};
tblMenu[1].SubMenu[2].Text = "S&ubItem Long 2"..String.Char(9).."Ctrl+F";
tblMenu[1].SubMenu[2].ID = 102;
tblMenu[1].SubMenu[2].Checked = false;
tblMenu[1].SubMenu[2].Enabled = true;
-- Set the menu based on the info in the above table
Application.SetMenu(tblMenu);
dorkauf89
01-26-2008, 08:48 AM
Thanks.......
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.