pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill van Melle <bill.van.me...@gmail.com>
Subject Component#isEnabled does not affect appearance recursively
Date Fri, 07 Oct 2011 01:57:56 GMT
For a long time, I've been thinking that Pivot does a particularly poor job
of making disabled controls visually different, but I finally realized
what's going on.
If you have a simple component with enabled=false, it is rendered in a
visually distinct "grayed-out" way, like other toolkits do.  However, if you
have a container with  enabled=false, its children render normally.  If you
want a whole container to be disabled, and you want it to look like it's
disabled, you have to disable the children one by one (and keep track of
which ones should remain disabled for when you want to re-enable the
container)!  That's not true in other toolkits I've used. Am I missing

I see there is a method Component#isBlocked, which provides the needed
functionality, but it looks like it's only being used by the event
propagation code.  Seems to me there is a whole lot of paint code in the
system for which something.isEnabled() ought to be replaced by
!something.isBlocked().  Yes?

View raw message