Path: news.mathworks.com!not-for-mail
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$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1366321510 28254 172.30.248.48 (18 Apr 2013 21:45:10 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 18 Apr 2013 21:45:10 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com 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?