Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1825
Getting at the Tools object properties?
posted

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:

uwTBMgr.Ribbon.Tabs(

 

 

 

"Home").Groups("Search Orders").Tools("Search By"). ????

I want to say: .SelectedIndex = -1

Any help would be appreciated. Thanks.

Deasun.

 

 

 

Parents
  • 6158
    Suggested Answer
    Offline posted

    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!"

    Let me know if you require further assistance.
    Thanks,
    Chris.

Reply Children
No Data