popupPanel Displays a popup panel with specified content

버전 1.7.0.0 (5.52 KB) 작성자: Yair Altman
popupPanel Displays a popup panel with specified file contents, help topic, HTML or webpage
다운로드 수: 1.1K
업데이트 날짜: 2020/5/11

라이선스 보기

Syntax:
hPopupPanel = popupPanel(contents, position, highlightedWords)

Description:

popupPanel(CONTENTS) displays Matlab's help popup (available on Matlab releases R2007b onward) with the specified CONTENTS, which is one of:
- Webpage URL (e.g. 'UndocumentedMatlab.com'). Supported in all Matlab releases as of R2020a
- Help topic string (e.g. 'surf' or 'myFunction'). Not supported in R2020a+
- HTML text (e.g. '<b>bold</b> <i>italic</i> text'). Not supported in R2020a+ (you can place the HTML in a file and load the file)
- text filename (e.g. 'my_data.txt'). Supported in all Matlab releases as of R2020a

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.

Examples:
popupPanel('UndocumentedMatlab.com'); % display an online webpage
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('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

Warning:
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 http://undocumentedmatlab.com/blog/customizing-help-popup-contents

인용 양식

Yair Altman (2024). popupPanel Displays a popup panel with specified content (https://www.mathworks.com/matlabcentral/fileexchange/25975-popuppanel-displays-a-popup-panel-with-specified-content), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Entering Commands에 대해 자세히 알아보기
태그 태그 추가
gui

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.7.0.0

Fixes for R2014b-R2020a. Note: only URLs and local files are supported in R2020a

1.5.0.0

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

1.4.0.0

Prevent endless loop if popup-panel handle is not found

1.3.0.0

Several fixes for modern Matlab releases

1.1.0.0

Fixed compatibility issue with R2009 highlightedTerms

1.0.0.0