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?
Looks like I need to create an instance of a DockableControlPane for the tab I want to activate. Pretty complicated and specific to the whole screen design so no worries if no one has any input.
Tim,
Which control on which platform are you using?
These are Epicor screens and I have added a new custom tab. The control type is Epicor.Mfg.UI.FrameWork.EpiBasePanel which I believe is extended from Epicor.Mfg.UI.FrameWork.BasePanel.
I would need to know what Infragistics control is being used and what platform you are on to know if I can help you. Does the Epicor.Mfg.UI.FrameWork.BasePanel derive from an Infragistics control or use Infragistics controls? Or is the Epicor.Mfg.UI.FrameWork.EpiBasePanel used within an Infragistics control?
Let me know if you have any questions.
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");
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.