on 02-20-2008 3:12 PM
Why there is no menu "Delete Row" display when I right click on my UDF? How to add it? Please let me know. Appreciate.
Ying Zhang
in a user Matrix you have to program the rightclick remove line by yourself
use the RightClickEvent for this:
i give you a c# sample
SAPbouiCOM.MenuItem oMenuItem = null;
SAPbouiCOM.Menus oMenus = null;
SAPbouiCOM.MenuCreationParams oCreationPackage = null;
try
{
if (eventInfo.BeforeAction == true)
{
oCreationPackage = ((SAPbouiCOM.MenuCreationParams)(globals.SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)));
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING;
oCreationPackage.UniqueID = "DelRow";
oCreationPackage.String = "Zeile löschen";
oCreationPackage.Enabled = true;
oMenuItem = globals.SBO_Application.Menus.Item("1280"); // data'
oMenus = oMenuItem.SubMenus;
oMenus.AddEx(oCreationPackage);
}
else
{
globals.SBO_Application.Menus.RemoveEx("DelRow");
} catch (Exception er)
{
}
finally
{
oMenuItem = null;
oMenus = null;
oCreationPackage = null;
GC.Collect();
}
what you have to do it is to catch the pval.menuid from the menuevent and remove it by yourself
much luck
and when your are happy reward me )
regards
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.