PDA

View Full Version : right click



hamedheydari
08-08-2009, 03:01 AM
hello
i need add a custom right click menu in my project...
You can help me?

sample :

hamedheydari
08-09-2009, 01:51 AM
not answer ????

bule
08-09-2009, 02:51 AM
http://www.indigorose.com/webhelp/ams/Program_Reference/Actions/Application.ShowPopupMenu.htm

bule
08-09-2009, 02:53 AM
if(e_Type == RIGHT_BUTTON_DOWN)then
tblMenu = {};
tblMenu[1] ={};
tblMenu[1].Text = "&New Menu";
tblMenu[1].ID = 100;
tblMenu[1].IconID = 0;
tblMenu[1].Checked = false;
tblMenu[1].Enabled = true;
tblMenu[1].SubMenu = {};
tblMenu[1].SubMenu[1] = {};
tblMenu[1].SubMenu[1].Text = "&SubItem 1";
tblMenu[1].SubMenu[1].ID = 101;
tblMenu[1].SubMenu[1].IconID = 1;
tblMenu[1].SubMenu[1].Checked = false;
tblMenu[1].SubMenu[1].Enabled = true;
tblMenu[1].SubMenu[2] = {};
tblMenu[1].SubMenu[2].Text = "S&ubItem 2";
tblMenu[1].SubMenu[2].ID = 102;
tblMenu[1].SubMenu[2].Checked = false;
tblMenu[1].SubMenu[2].Enabled = true;

nRes = Application.ShowPopupMenu(e_X, e_Y, tblMenu, TPM_LEFTALIGN, TPM_TOPALIGN, true, true);

if(nRes == 0)then
Dialog.Message("Menu Result","Cancelled");
else
Dialog.Message("Menu Result","Menu ID selected = "..nRes);
end
end

hamedheydari
08-09-2009, 09:10 AM
Thank You Very Much

mimo
08-12-2009, 05:49 PM
thank u , but if there are any example for it that would be great

Imagine Programming
08-12-2009, 06:14 PM
thank u , but if there are any example for it that would be great

Just copy the code and paste it in a button's On Click event... There ya go, an example :)