I want to set a specific tab as the active tab based on a tool click event. How do I get at the active tab/focus property for a specific tab on a form?
Tim, I am 6 years late, but perhaps this will help someone else.
To do this, I grabbed the MainDockPanel of the form via csm. Then I was able to use ActivateSheet(name of sheet) to focus. Note this will not work in the InitializeCode since apparently the panel isnt configured yet, but anytime from OnLoad on should work. Also note, it handles multiple layers, in my case this MassEntry tab is 3 deep from the MainDockPanel
Example:
var mdp =(Erp.UI.App.SelectSerialNumbersEntry.MainDockPanel) csm.GetNativeControlReference("29b56335-57d8-4247-9867-e2fcb166cc2c"); mdp.ActivateSheet("MassEntry");
Tim,
OK, let me know when you get the rest of the screen changes done.
Unfortunately, no. I believe I need to get at the Activate() method for the tab. Because these are Epicor screens and I can't see how the panel is wired up to the screen, this is not a very simple problem. For now, I am moving on and will revisit this after I get the rest of the screen changes done.
Thank you for your feedback.
Did that suggestion work for you?
You should be able to do that by setting the IsSelectedTab property of the DockableControlPane to true.
Try something like this:
udm.ControlPanes[udm.ControlPanes.Count - 1].IsSelectedTab = true;
Let me know if that works for you.