[wx-dev] what should IsEnabled() really return?
Stefan Csomor
csomor at advancedconcepts.ch
Sat Mar 17 00:17:17 PDT 2007
Hi
> This raises the question. Do we really need the IsThisEnabled() at
> all?
I've had situations where I needed those functions from the viewpoint of
a port developer, but not as a wx-user.
Imagine we have a port that does not have a true native control, but has
to maintain the enabled/disabled state itself.
In wx we support the contract that you can disable a parent, this does
automatically 'visibly' disable its children as well. Now you could
disable the child directly, and enable the parent again, the child must
remain disabled.
Now one thing would be to do it the way wxmsw has to do it, by having a
disabled childrens list in the parent control, but to me this kind of
'outside' state of an object isn't exactly what I'd be aiming for.
Having this 'true' state and the 'cumulative' state available would be
great. I absolutely agree that IsEnabled() should return the cumulative
state, and that this is what the wx-user will be interested in. But I
also have experienced that having the 'true' state somewhere available
is beneficial for writing ports.
Best,
Stefan
More information about the wx-dev
mailing list