From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Hide and disable uicontrols in groups
Date: Thu, 18 Apr 2013 21:45:10 +0000 (UTC)
Organization: Xoran Technologies
Lines: 6
Message-ID: <kkpph6$riu$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1366321510 28254 (18 Apr 2013 21:45:10 GMT)
NNTP-Posting-Date: Thu, 18 Apr 2013 21:45:10 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: comp.soft-sys.matlab:793869

I'm designing GUIs where, sometimes, I want whole groups of uicontrols to be hidden from and inaccessible to the user. The tedious way to do this would be to set the Enable and Visibility properties to 'off' for each button individually. However, I was hoping for some way to designate them as a group and hide them using a single property set.

My first thought was to put them all on a uipanel and control them all through that. This works fine for controlling Visibility. Setting the panel's visibility property off hides everything. However, there doesn't seem to be a corresponding Enable property in a uipanel that can be used to deactivate all the uicontrols residing within it. I tried the HitTest property. That didn't work.

Any recommendations for how best to do this?