Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Implementing a 'Help' GUI
Date: Tue, 28 Jul 2009 23:23:02 +0000 (UTC)
Organization: TACT Computer Systems Ltd
Lines: 12
Message-ID: <h4o18m$l35$1@fred.mathworks.com>
References: <h4ku7v$cnm$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1248823382 21605 172.30.248.37 (28 Jul 2009 23:23:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 28 Jul 2009 23:23:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 642467
Xref: news.mathworks.com comp.soft-sys.matlab:559135


> Here are my thoughts so far.  My GUI has fake tabbed panels controlled by a button group.  There are several panels taking up exactly the same space, each linked to a button, so that a button press makes the relevant panel visible and all others invisible.  

You can use the built-in uitab and uitabgroup for this. The benefit is that they look like standard system tabs, a look-and-feel that is difficult to achieve with regular buttons.

> As for the topic list part of the 'Help' figure, it seems like a listbox with BackgroundColor set to the default ui background color makes a decent topic list.  Hierarchical structure of terms is not very good.  Adding spaces to the beginning of strings to get indentations is a hassle and hard to maintain as the topic list changes, and I don't see a good way to collapse/expand sub-lists of topics in the hierarchy.  Also, the terms do not look like they link to information (they can be turned blue with 'ForegroundColor', but I don't see a way to underline the text).

Try to use the built-in uitree and uitreenode functions. They allow collapsing/expanding nodes as well as customizing node fonts. See my FindJObj submission on the File Exchange for an example: http://www.mathworks.com/matlabcentral/fileexchange/14317

Note that these 4 functions are undocumented and unsupported officially. They work and will compile into a stand-alone application, but may change interface in some upcoming Matlab release.

Yair Altman
http://UndocumentedMatlab.com