automat / controlkit.js

A lightweight controller and gui library
823 stars 82 forks source link

Dynamically changing a button's label #5

Closed djipco closed 8 years ago

djipco commented 8 years ago

I just discovered ControlKit and I really like it. Congrats!

Is there a way to dynamically change a button's label? I couldn't find how. Basically, I want to have a toggle-style start/stop button so I need to change the label.

Cheers!

P.S. It would be nice if callback functions received the component and value as parameters.

automat commented 8 years ago

Added getButtonLabel() setButtonLabel() with @0527fe998cae5b20cc67f01e383f9d2889aa8108, check button-example for usage. Callbacks will be bound to component with next version.

djipco commented 8 years ago

Great! This is going to be very helpful.