Ok i feel like a fool. i cant figure out how to get the the tools control properties.
Example I have a tab with group that has ;
a] Combox b] textbox c] button
How do I set the Selectedindex property of the combobox ?
Set the text value of the textbox object?
This is what I have:
uwTBMgr.Ribbon.Tabs("Home").Groups("Add Order").Visible = True
So that makes the group visible. And the following makes the tool visible;
uwTBMgr.Ribbon.Tabs(
"Home").Groups("Order Detail Tools").Tools("Add a Line").InstanceProps.Visible = Infragistics.Win.DefaultableBoolean.True
Heres my combobox:
"Home").Groups("Search Orders").Tools("Search By"). ????
I want to say: .SelectedIndex = -1
Any help would be appreciated. Thanks.
Deasun.
Hello,
The Tools property is a collection of ToolBase objects, so when you index into the collection, the object reference is returned as a ToolBase type. To access the properties specific to a certain type of tool, you will have to cast the ToolBase object to the specific tool type.
For example:
CType(uwTBMgr.Ribbon.Tabs("Home").Groups("Search Orders").Tools("Search By"), Infragistics.Win.UltraWinToolbars.ComboBoxTool).SelectedIndex = -1
CType(uwTBMgr.Ribbon.Tabs("Home").Groups("Search Orders").Tools("TextBoxTool1"), Infragistics.Win.UltraWinToolbars.TextBoxTool).Text = "woohoo!"
Thanks for the reply.
I came up with this answer before I saw your reply.
Dim objTxtBox As Infragistics.Win.UltraWinToolbars.TextBoxToolobjTxtBox = .Tabs("Home").Groups("Search Orders").Tools("Search For")objTxtBox.Text = ""
Thanks again.