Embedded dashboard opens to that tab on opening of program

I embedded a dashboard into the part entry screen and now when opening the program it always opens to that tab. I have attempted to save the layout to the summery tab and then saving the customizaion, but this does not seem to work. Any ideas on how to open this to the correct tab?

Using Developer Mode turned on, open the form and click on an object on the tab you want to open. Then, use Tools > Save Layouts. This works 80% of the time… :thinking:

1 Like

That did not work for me. Looks like I am in the 20% category!

You could set a focus on a certain field after the form loads? This is a crummy way of doing it but I’ve had to do that before.

I did see some information about people doing that. I think this would be done from the Form Event Wizard correct? My event type would be on “Load” but I am totally unsure of the code to use to make this work.

Yeah it’s pretty easy! You’d use the wizard to generate your form load event. Then, you would grab the control reference of the field you want to focus on and call it’s focus method.
Here is an example where on a UD01 form load event, I center the form to the screen and call the focus to a specific control, which happens to be a drop down type control:

//Center the form to screen
private void UD01Form_Load(object sender, EventArgs args)
{
  UD01Form.StartPosition = FormStartPosition.CenterScreen;
  //set the users focus to a specific control. Be aware, this can trigger UI events
  //This will change a little depending on the control type, but the premise is the same
  //The control's EpiGuid property and type (like Erp.UI.Controls.Combo or Ice.Lib.Framework.EpiButton) can be found in the control properties
Erp.UI.Controls.Combos.InspectrCombo cmb = (Erp.UI.Controls.Combos.InspectrCombo)csm.GetNativeControlReference("fd9fe6a9-c62e-4a1e-86cf-57f55bb73815");
cmb.Focus();

}

You would get your control reference from the control properties.

1 Like

Thank you very much. This worked perfectly!