Greetings,
I have made a custom form off of UD04 (Classic Epicor 10) and am trying to remove specific buttons on form load. It appears that I may be using the wrong tool names as the “DeleteTool” removes delete from the toolbar but the other two still show up. To that end, does anyone know where I can find the code name for “Cut” and “New”?
Blockquote
private void UD04Form_Load(object sender, EventArgs args)
{
// Add Event Handler Code
baseToolbarsManager.Toolbars["Standard Tools"].Tools.Remove(baseToolbarsManager.Tools["DeleteTool"]);
baseToolbarsManager.Toolbars["Standard Tools"].Tools.Remove(baseToolbarsManager.Tools["NewTool"]);
baseToolbarsManager.Toolbars["Standard Tools"].Tools.Remove(baseToolbarsManager.Tools["CutTool"]);
}
Blockquote
Hally
(Simon Hall)
February 14, 2025, 11:54am
2
Use this code tied to a button click to list it all out.
Kudos goes to this post List Tools on Custom Dashboard Form
using System.Reflection;
private void epiButtonC1_Click(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
var obj = AbcCodeForm.GetType().InvokeMember("baseToolbarsManager", BindingFlags.Instance | BindingFlags.GetField | BindingFlags.NonPublic, null, AbcCodeForm, null);
var tools = (Infragistics.Win.UltraWinToolbars.UltraToolbarsManager)obj;
string toolnames = "";
foreach(var t in tools.Tools)
{
toolnames += t.Key +" , ";
}
MessageBox.Show(toolnames);
}
and before anyone yells. Disclaimer, try not to use System.Reflection.
I hope that helps.
Tested and works with 2024.2
Thank you very much. This got me exactly what I needed.
1 Like
Hally
(Simon Hall)
February 18, 2025, 12:09am
4
Sorry I think your meant to set my post as the solution, are you not?
Looks like I set it in the wrong place. Does it show now?
1 Like