Path: news.mathworks.com!not-for-mail
From: "Donn Shull" <donn.shull.no_spam@aetoolbox.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Implementing a 'Help' GUI
Date: Tue, 28 Jul 2009 00:12:01 +0000 (UTC)
Organization: L &#38; D Engineering LLC
Lines: 16
Message-ID: <h4lfoh$ne4$1@fred.mathworks.com>
References: <h4ku7v$cnm$1@fred.mathworks.com>
Reply-To: "Donn Shull" <donn.shull.no_spam@aetoolbox.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1248739921 24004 172.30.248.38 (28 Jul 2009 00:12:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 28 Jul 2009 00:12:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 219306
Xref: news.mathworks.com comp.soft-sys.matlab:558796


"Andy " <theorigamist@gmail.com> wrote in message <h4ku7v$cnm$1@fred.mathworks.com>...
> Is there a simple way to implement a 'Help' section for a GUI?  I can't seem to find things like scrollable panels, static text that works like a hyperlink (more accurately, static text that looks like a hyperlink), or (probably too much to hope for) a built-in search function.  It's also hard to check Google or FEX for this, because the combination of terms 'help' and 'GUI' turn up a flood of GUIDE tutorials, simple GUI code, and the like.  Is anybody aware of relevant code being posted on FEX or elsewhere?  If not, does anybody have any suggestions for implementation?  
> 
> 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.  This works fine for my four tabs in the GUI, but it seems like a poor solution for a 'Help' figure which might, even for a small program, have well over a dozen different topics.  Also, I don't actually know that this would work fine with several panels.  I did notice some unexpected behavior in my main GUI.  Specifically, I had two panels that had axes in them, and even when one was not visible it seemed to interact with graphing on the other.  In the end, I deleted one of them because it wasn't needed any more, so I never did figure out a reason for this behavior or a way to work around it.
> 
> 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).
> 
> If anybody has any thoughts, please share them.  

Hi Andy,

This may not be of interest to you, but if you are adding help that is going to be used only in MATLAB you can make use of the help browser that is included with MATLAB. There is a section about adding your own help, and demos to The MATLAB start button. The help can then be accessed with the "doc('myhelpsection')" from any MATLAB function or GUI.

Just a thought,

Donn