How can I create tabs in matlab gui?
I did something like this a while ago...
I mean I created some menus at top of my GUI and then pressing each menu will set visible property of some controls on and the others get off
that way is useful for small GUIs but in beag GUIs it encounters problems and editing the GUI gets hard
I need someway to create seperate GUIs acting just like Mozilla tabs
Is there anyway to create that?
Tabs aren't officially supported yet, even though there exists the semi-documented function uitab. Note that in 2012a it warns you that the function will change.
However, there is a very nice submission on the File Exchange, the GUI layout toolbox that comes with tab functionality.
Matlab supports tabs from R2014b
See uitabgroup
Related
I have been working on an gui developed using the GUIDE in Matlab. The current gui, I mean the general figure window contains all types of sliders, buttons, editboxes, etc...
After awhile, I added a toolbar to my gui which included the Save tool. I have not changed any specifications regarding the save tool. I used the one already in GUIDE toolbar editor.
After clicking it, my gui program is stuck at that very instance I pressed the save tool and I cannot do anything else with it. It also opens in the same situation even after restarting the PC. I do not get any errors.
I would appreciate any help. How to restore functionality to my gui?
Unfortunately the "Save" tool's default is not "Save As" with a prompt it is just the normal "save" which immediately overwrites. The tool saved your current figure (or GUI). Meaning it overwrote the fig file of your GUI with the current state.
So when you pressed "save" uicontrol visibility, values, slider positions, edit box text etc. all was written into the FIG file. So the next time you launch it is all still in there.
To Fix it you will probably have to edit in GUIDE and try to clear / reset everything to your desired initial state.
Is it possible to make an extension that draw lines on the background? You can decorate a lot of thing but I can't find a way to draw colored lines.
I would like to see the flow of my data (inspired by visual programming).
Something like that (but the like drawn under the text) :
Keep in mind vscode is an add-on to Electron, which is a webbrowser in a desktop raiment. So what you see are webpages and hence everything what's possible on a webpage (with a node.js basement) is also possible in vscode - at least in theory. I say "in theory" because after all vscode is a text editor and limits interaction in a way that supports this goal. So, what you can is either some drawing/graphics or add extensions that work in normal editor pages. You certainly don't want to write your own text editor interface within vscode.
I am pretty new to MATLAB GUI. I've attempted to teach it to myself the last few weeks so I can understand and improve some code that is being developed where I work. GUI is still a fairly new concept to me.
I am wondering: I need the command window to output the mean of a set of data according to a function that is called by pressing a button on the GUI. Where would I include this code and how should I go about it?
Thanks
You can debug the code by using 'disp' or 'fprintf' functions. Notice that converts your content to compatible with the function.
I am sorry for asking the same questions which has been asked before. But the thing is I am not in matlab for a long and especially during trying to build a GUI I am crossing some problems which looks like complicated when l compare which C#.
Now I am using Matlab 7.12.0(R2011a) and I want to know the possibility to add tab in my GUI to make it more clear.
I am appreciate for answers which could give me an idea to figure out.
Thanks.
You can create tabs using uipanels where you toggle the visibility to reproduce the tab like behaviou, there are a few utilisties on the Matlab FEX.
To do this you need to be happy with creating GUI's using code only (no guide).
If you do want an easy interactive way of creating a GUI with tabs then I have my own commercial GUI toolbox that creates very nice tabs.
I'm writing a program who will generate a couple of figures and I want to dock them all together. I can, to dock them, use the command:
set(fig1,'WindowStyle','docked');
set(fig2,'WindowStyle','docked');
etc.
But I can't find how to manage the layout of the figures inside the container or even the container size from the code. Is there a way to do it?
You cannot set the Position property when figures are docked.
From Docking Figures in the Desktop:
If WindowStyle is set to docked,
MATLAB automatically sets DockControls to on.
You cannot set the DockControls property to off.
You cannot set the figure Position property.
As for laying out the figures, you could use subplot to display multiple plots in one figure, which you can dock.
There's no documented way to programmatically set the docking group of figures.
However, I believe #Yair Altman's setFigDockGroup, available from MATLAB Central File Exchange, enables you to do it (by manipulating undocumented properties of the figures and the MATLAB desktop).
Even if it doesn't quite do what you need, I would guess that by looking through that code you would find a way to do it (although you might need to be comfortable with a bit of Java).
There is an undocumented way to achieve this. You can get inspiration from FileExchange: http://www.mathworks.com/matlabcentral/fileexchange/46352-editor-session-manager.
This is saving the layout for the Editor Group.
One could adapt for a figure group.