Ken & Mike on the MATLAB Desktop
August 29th, 2007
I Came, I Saw, I Created my own Desktop Layout
When I watch customers use the Desktop, I often see that there is one part of it that gives them the most trouble: moving desktop components to organize the layout. Layout out components is easy to do once you know the trick. As an example, I’ll show you how to move the Workspace browser to a tabbed position with the Command History.
Dragging
From the default layout, I first grab the Workspace titlebar and drag it around. The important thing to remember about getting it to lock into the right place, is to NOT LET GO of it until you see the black lines indicate the correct position. For example, as I drag the Workspace browser, I see black lines that don’t line up with the position I want:

And, I don’t want this position either! I’ll keep dragging to find the right spot:

Now, I see the outline that matches the position I want, like this one:

There are so many different positions that the window can drop into and these little black lines are your guide to moving the windows into the spots that you want.
Dragging
After you have spent a bit of time getting the layout just the way you like it, save the layout so you can easily get it back later. Go to the “Desktop” menu, “Save Layout…” menuitem. Enter a name for the layout and hit ok:

After the layout has been saved, you can re-set it by going to the “Desktop menu”, “Desktop Layout” menuitem and choosing your saved layout.

By
Kristin Thomas
Kristin is a developer on the MATLAB Desktop team. She works primarily on the Command Window when she is not throwing herself down a mountain on her snowboard.
14:49 UTC |
Posted in Desktop |
Permalink |
You can follow any responses to this entry through the RSS 2.0 feed.
You can skip to the end and leave a response. Pinging is currently not allowed.
Leave a Reply
|
Kristin,
I have a question regarding the desktop layouts. Why can’t the deploytool remember its location in a desktop layout? Or, is there a way to make it do so? I would appreciate this being addressed at some point.
Thanks,
Dan
Are the desktop layouts easily transferable between matlab versions or between computers? I use both 2006b and 2007a (because of some bugs) on a laptop (small models) and a desktop (larger, longer models). I’d love to be able to copy (rsync or unison) a single file between all four matlab installations.
Dan,
I don’t know of any way to make the deploytool rembember its location in the current release (2007a) but have you checked out the 2007b prerelease…
Jason,
There are some limitations but layout files can be shared between MATLAB versions. When you save a layout, say naming it “My Layout”, a file named “My LayoutMATLABLayout.xml” is written to the MATLAB prefdir. You can manually copy this file to the prefdir of another release. In fact when you install a new release these files are automatically carried forward. The limitation is that if you create a layout under 2007a which places components in the newly introduced minimized or maximized states then 2006b won’t know how to interpret the layout file.
Is there a possibility to open a predefined layout “My Layout” by the command line? I already tried to do it with the commands of
“com.mathworks.mlservices.MatlabDesktopServices”, but I couldn’t find an appropriate function.
Thank you very much for reply,
Peter
Can I add some menuitems of my own?
Can I add some new browsers?
Can I control the interface of matlab freely?
Can I use a script to switch between Desktop Layouts, i.e., is it possible to do it without using the mouse?
Ben,
No there is no supported way to do this right now.
@Ben and Peter P. - saving and switching layouts can indeed be done programmatically. However, as Mike mentioned this is not supported and so might break in future Matlab releases, as it has indeed in the past.
With this warning in mind, you are welcome to read the details here:
http://undocumentedmatlab.com/blog/setting-the-matlab-desktop-layout-programmatically/
Yair