Author Topic: ribbon checkbox  (Read 1541 times)

0 Members and 1 Guest are viewing this topic.

sybold

  • Newt
  • Posts: 62
ribbon checkbox
« on: March 28, 2013, 08:14:20 AM »
i've made a checkbox in the ribbon, to enable and disable a custom osnap.
that all works fine, but i was wondering if it would be possible to check the checkbox by commandline?

TheMaster

  • Guest
Re: ribbon checkbox
« Reply #1 on: March 28, 2013, 08:44:32 AM »
i've made a checkbox in the ribbon, to enable and disable a custom osnap.
that all works fine, but i was wondering if it would be possible to check the checkbox by commandline?

If you did it correctly, the check box would be checked when the osnap is enabled, regardless of how it happens. You have to bind the checked property to a custom class that exposes the osnap mode as a boolean property. That class must support the INotifyPropertyChanged interface, and must listen to the SystemVariableChanged event. When the OSMODE sysvar changes, you raise the PropertyChange event, and have the boolean properties of your class return true/false for each osnap mode.