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
45
Quick Questions StateButton Toogle
posted

Some days the easy stuff just aint so easy. :)

 I just can't seem to get to the property for toogling the statebutton (ie checked). I'm using the ribbon mode, I have a group with a statebutton.

In code i'm trying to find the "checked" property.

utmToolbar.Tool[44].checked = false;

It's just not there to be found :(

Thanking you in advance,

Derek

Parents
  • 45049
    Verified Answer
    posted

    The code "utmToolbar.Tool[44]" gives you an object of type ToolBase, which doesn't have a Checked property.  Try casting this to a StateButtonTool object first.

    In C#:  ((StateButtonTool) utmToolbar.Tool[44]).Checked = false;

    In VB.NET:  DirectCast(utmToolbar.Tool(44), StateButtonTool).Checked = False

Reply Children
No Data