Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

How to get the list data from a listbox within a saved and recalled .fig file?

Asked by John

John (view profile)

on 8 May 2013

I have tried to used get(h,'children') etc. to access the info stored in the .fig file. It seem to be there as the list is about 300 items and can be scrolled to and clicked on from the recalled figure file. The goal is to be able to provide a dynamic .fig file for a secondary user to open and manipulate. Thanks, John



John (view profile)

1 Answer

Answer by Walter Roberson

Walter Roberson (view profile)

on 8 May 2013
Accepted answer
listbox_handles = findobj(h, '-type', 'uicontrol', '-style', 'listbox');

There might be more than one, of course. If you know the tag you are looking for, then

listbox_handle = findobj(h, '-tag', 'TheTagHere');

1 Comment


John (view profile)

on 14 May 2013

Thanks, I'm new to this forum setup. Your code worked perfectly. I thought that I could use a similar method to obtain the rowlabels from a clustergram that was plotted and saved as a figure ( .fig) file. and then put that into a listbox so that a user would need only the fig file to dynamically focus into the gene area of interest of a clustergram. As a second question I have posted a question concerning how to obtain the label list from such a clustergram embedded in a plot .fig file. It's likely as simple as your listbox answer but I'm having trouble extracting the gene labels. Thanks again Walter, John Rodgers

Walter Roberson

Walter Roberson (view profile)

Contact us