PDA

View Full Version : e_Key not working with Mousebuttons?


SonG0han
01-26-2008, 06:14 AM
The List with key codes include mousebuttons like 2 for Right Mouse Button but it does not seem to work if you want to show a popupwindow on rightclick on a tree object or input object.

In the manual e_Type is used for the page On Mouse Button Event, but it should only appear if you rightclick specific objects.

Is there a way to do this?

Example:
if e_Key == 2 then

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";
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 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

Darryl
01-30-2008, 09:30 AM
We'll take a look at that (REF: 17184). I checked in version 6.0 and it actually behaved the same way. We'll have a look to see if that can be done. The only way I can see now is using one of the supported events.