Hi all,
I'm struggling with what is probably a fairly basic problem. Have a WinToolbar with a combobox and a go button underneath that launches a new MDI child form. I'm trying to pass the selection in the combobox as to the child from on opening, but can't find seem to find the correct code i'm looking for. Combobox is called MobileComboBox and my code for the button is as follows;
private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e) {switch (e.Tool.Key) case "MobileNumberGo": // ButtonToolForm2 newMDIChild = new Form2(); newMDIChild.MdiParent = this; newMDIChild.Show();break; Trying to pass the value into Form2(xxx);Any help would be greatly appreciated.
{
}
Cheers,
Andrew
Apologies for the code formatting. Doesn't seem to work properly.
private void ultraToolmarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
{switch (e.Tool.Key){
case "MobileNumberGo":Form2 newMDIChild = new Form2();newMDIChild.MdiParent = this;newMDIChild.Show();break;}}
Trying to pass the Combobox value as a String variable to Form2.
You must cast the e.Tool property to a ComboBoxTool. Then you can get the Text or Value properties to determine what is selected in the ComboBox.