Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Quick uicontrol question (popupmenu)
Date: Sat, 2 Oct 2010 18:49:03 +0000 (UTC)
Organization: TACT Computer Systems Ltd
Lines: 19
Message-ID: <i87uqv$hd$1@fred.mathworks.com>
References: <603919594.30362.1285932738768.JavaMail.root@gallium.mathforum.org>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1286045343 557 172.30.248.37 (2 Oct 2010 18:49:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 2 Oct 2010 18:49:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 642467
Xref: news.mathworks.com comp.soft-sys.matlab:675312

Chris <skynet414@gmail.com> wrote in message <603919594.30362.1285932738768.JavaMail.root@gallium.mathforum.org>...
> Hey, a quick question; what is the command to show the popupmenu's selection list? uicontrol(handle) doesn't work and I can't see a solution in the documentation, thanks!.

There is no documented way to do this, but you can use one of the following undocumented ways, mentioned by Matt and Walter:

1. Using FindJObj - 
a) Download the FINDJOBJ utility from the Matlab File Exchange - http://www.mathworks.com/matlabcentral/fileexchange/14317-findjobj-find-java-handles-of-matlab-graphic-objects
b) Unzip FindJObj in your favorite Matlab path
c) Use FindJObj as follows:
hPopup=uicontrol('style','popup','string',{'a','b','c'});  % create popupmenu
jPopup = findjobj(hPopup);
jPopup.showPopup;  % so simple!

You can use the UIInspect utility to check all the properties and methods that jPopup supports - http://www.mathworks.com/matlabcentral/fileexchange/17935-uiinspect-display-methods-properties-callbacks-of-an-object

2. Using Robot - see explanation here: http://undocumentedmatlab.com/blog/gui-automation-robot/ 

Yair Altman 
http://UndocumentedMatlab.com