Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: change setEnabled(...) to enable / disable GUI component responsiveness #74

Closed
dhenrie0208 opened this issue May 4, 2016 · 2 comments

Comments

@dhenrie0208
Copy link

The current functionality of toggle->setEnabled(...) either checks or unchecks the toggle button. This method has no apparent impact on regular buttons as far as I can tell. I haven't yet investigated the impact of changing the enabled state on other widget types.

I'm trying to develop a GUI where widgets are either "enabled" (responsive to user interactions) or "disabled" (grayed out and non-responsive). This is the nature of the "enabled" state in other GUI's, such as those made in Visual Studio. I was hoping the setEnabled method would have this effect, but discovered it doesn't.

For example, in the following image, the right-most column of widgets are disabled, whereas the two left-most columns of widgets are enabled:
enabled, disabled widgets

Would it be possible to change the setEnabled method so that when a widget is enabled (getEnabled() == true), the user can change its value(s), and it has a normal coloring scheme, and that when it's disabled (getEnabled() == false), the widget retains the same value(s), but is unchangeable and has a muted coloring scheme?

As a replacement for the origional get/setEnable(d) methods, a get/setValue(...) method could be implemented that would either return true/false for the Toggle widget and other widgets of similar behavior.

@braitsch
Copy link
Owner

I agree and just added getChecked & setChecked methods to toggles that will allow you to change and retrieve their checked state. I also added an onToggleEvent that you can bind to toggles which will fire when their state changes. I agree that setEnabled & getEnabled methods should only influence the component's ability to receive events, which those methods now do, however themes do not yet support assigning a visual enable/disable state but I think this is a good idea and will add it to the roadmap.

@braitsch
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants