Search Results for: gui

211 relevant articles found:

Customizing uitree nodes – part 2

In my previous posts I have shown how Matlab’s semi-documented uitree and uitreenode functions can be used to display hierarchical (tree) control in Matlab GUI. Today I conclude this mini-series by answering a reader’s request to show how checkboxes, radio buttons and other similar controls can be attached to tree nodes. There are actually several ways this can be done: Matlab icon control The simplest is to create two icons (checked… Continue reading

Categories: GUI, Java, Medium risk of breaking in future versions, Semi-documented function
Tags: , , , ,
55 Comments

GUI automation utilities

Once again, I welcome guest writer Takeshi (Kesh) Ikuma. Last week, Kesh described how Java’s Robot class can be used to automate Matlab GUI. Today, Kesh will describe two Matlab utilities that help this automation process. jMouseEmu and inputEmu are both available on the Matlab File Exchange. There is a large overlap between these utilities. As their name suggests, jMouseEmu is geared to control the mouse, while inputEmu emulates both mo… Continue reading

Categories: Figure window, Guest bloggers, GUI, Java, Low risk of breaking in future versions
Tags: , ,
7 Comments

Date selection components

Have you ever wondered why Matlab does not have standard GUI date-handling components? Matlab has many built-in date-handling functions (calendar, date, datestr, datenum, datetick, datevec etc.). Unfortunately, this built-in support does not extend to Matlab GUI. If we need a date-selection drop-down or calendar panel we have to design it ourselves, or use a third-party Java component or ActiveX control. JIDE Components Luckily, we have a much… Continue reading

Categories: GUI, Java, Medium risk of breaking in future versions, Undocumented feature
Tags: , , , , ,
64 Comments

Advanced Matlab seminars – London, 10-14 March 2014

Advanced Matlab training courses/seminars will be held in London, March 10-14, 2014. Two separate courses will be held: Advanced Matlab Programming – 2 days (March 10-11), including best practices, preparing professional reports, writing professional code and performance tuning. US$1199 Advanced Matlab Visualization & GUI – 3 days (March 12-14), including advanced visualization and GUI techniques. US$1799 Enroll to both courses… Continue reading

Comments Off on Advanced Matlab seminars – London, 10-14 March 2014

Using spinners in Matlab GUI

…to download this demo from the Matlab File Exchange and reuse its source code. Java’s SpinnerDemo    My Matlab SpinnerDemo As can be seen from the screenshot, SpinnerDemo also demonstrates how to attach a label to a GUI control with an associated accelerator key (Alt-D in the screenshot example, which sets the focus to the Date control). An internal component in Matlab, namely com.mathworks.mwswing.MJSpinner, extends javax.swing.JSpinne… Continue reading

Categories: GUI, Java, Low risk of breaking in future versions
Tags: , ,
14 Comments

Using JIDE combo-boxes

Continuing last week’s article on customized combo-boxes (a.k.a. popup menus or drop-downs), today I discuss how we can use JIDE‘s vast array of custom professional combo-boxes in our Matlab GUI. As I’ve already noted here in several articles, Matlab heavily uses JIDE’s library of GUI controls for its own GUI (Desktop, Editor etc.) and we can tap into this wealth of components in our own GUI. I’ve recently shown an… Continue reading

Categories: GUI, Java, Low risk of breaking in future versions
Tags: , ,
2 Comments

Adding a context-menu to a uitree

…ssible to add uicontextmenus to uitree.
Your post saved my time.
Thanks a lot Scott Koch If you have access to the figure handle (stored as User Data for instance) you could also use the click event coordinates to display a GUIDE created context menu:

 ...
if eventData.isMetaDown
fh = get(hTree,'UserData');%Get figure handle
cm = findobj(fh,'tag','mycontextmenu');%Get context menu handle.
tpos = get(hTree,'Pixel... Continue reading

Categories: GUI, Java, Low risk of breaking in future versions, UI controls
Tags: , ,
29 Comments

Setting status-bar components

I last week’s post, Setting status-bar text, I showed how to set the status-bar text in Matlab figures and the main desktop. But Matlab status-bars are Java containers in which we can add GUI controls, not just simple text labels. In this post I will show how to do this for Matlab 7 figures. Let’s return to the two alternatives I’ve presented in my previous post for setting a Matlab 7 figure status-bar text: % Alternative #1 (… Continue reading

Categories: Figure window, GUI, Java, Medium risk of breaking in future versions
Tags: , , ,
15 Comments

JTattoo look-and-feel demo

Three years ago, I wrote an article about modifying Matlab’s look-and-feel (L&F, or LnF), using Java’s built-in support for replaceable LnFs. To date, that article has 27 comments by 13 different commenters (plus 20 responses by me), making it the second most active article on this website. I decided to follow up on that article with a demo that shows the effects that different L&Fs have on GUI controls, and a demonstration… Continue reading

Categories: Guest bloggers, GUI, Java, Medium risk of breaking in future versions, UI controls
Tags: , , , ,
13 Comments

Rich Matlab editbox contents

…javax.swing.text.html.HTMLEditorKit); % alternative: jEditbox.setContentType(‘text/html’); htmlStr = ['<b><div style="font-family:impact;color:green">’… ‘Matlab</div></b> GUI is <i>’ … ‘<font color="red">highly</font></i> customizable’]; jEditbox.setText(htmlStr) HTML contents in a Matlab editbox Let’s show another usage exampl… Continue reading

Categories: GUI, High risk of breaking in future versions, Java, UI controls
Tags: , , ,
51 Comments