View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
popupPanel Displays a popup panel with specified help topic, HTML or webpage

Be the first to rate this file! 6 Downloads (last 30 days) File Size: 5.29 KB File ID: #25975 Version: 1.5
image thumbnail

popupPanel Displays a popup panel with specified help topic, HTML or webpage


Yair Altman (view profile)


29 Nov 2009 (Updated )

popupPanel Displays a popup panel with specified help topic, HTML or webpage

| Watch this File

File Information

     hPopupPanel = popupPanel(contents, position, highlightedWords)

popupPanel(CONTENTS) displays Matlab's help popup (available on Matlab releases R2007b onward) with the specified CONTENTS, which is one of:
    - Help topic string (e.g. 'surf' or 'myFunction')
    - HTML text (e.g. '<b>bold</b> <i>italic</i> text')
    - Webpage URL (e.g. '')
    - text filename (e.g. 'my_data.txt')
popupPanel(CONTENTS,POSITION) indicates the panel's position and size in screen-relative regular Matlab format: [x,y,width,height]. If POSITION is empty or unspecified, then [x,y,500,300] is assumed, where (x,y) is the current pointer's location.
popupPanel(CONTENTS,POSITION,HIGHLIGHTEDWORDS) specifies a string term or cell-array of string terms that should be highlighted in the presented panel's CONTENTS. This feature is not supported in R2013a and later.
hPopupPanel = popupPanel(...) returns the Java handle reference of the created panel, allowing access to many useful properties and callbacks. Type "get(hPopupPanel)", "methodsview(hPopupPanel)" for details.
   popupPanel('surf'); % display the specified doc page
   popupPanel('myFunction'); % display a user-created help topic
   popupPanel('myFunction.m'); % display a user-created help topic
   popupPanel('<b>bold</b> <i>italic</i> text'); % display HTML text
   popupPanel('C:\localTextPage.txt'); % display a local file
   popupPanel('localWebPage.html'); % display a local webpage
   popupPanel(''); % display an online webpage
   popupPanel('surf',[200,300,400,500]); % display 400x500 popup at [200,300]
   popupPanel('surf',[],'surface'); % display popup, highlight 'surface' terms
   popupPanel('surf',[],{'surface','surfc'}); % highlight several terms

   This code heavily relies on undocumented and unsupported Matlab functionality. It works on Matlab 7.5+ (R2007b+), but use at your own risk!
Bugs and suggestions:
   Please send to Yair Altman (altmany at gmail dot com)

Technical details of the implementation can be found at

MATLAB release MATLAB 7.5 (R2007b)
Other requirements Java and the Desktop should be enabled (which they are normally)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
01 Dec 2009 1.1

Fixed compatibility issue with R2009 highlightedTerms

28 Jun 2013 1.3

Several fixes for modern Matlab releases

11 Jul 2013 1.4

Prevent endless loop if popup-panel handle is not found

12 Jul 2013 1.5

Fix yesterday's upload (I uploaded an incorrect version by mistake)

Contact us