MATLAB gui loads old settings - user-interface

I created a gui with MATLAB's GUI Builder. After some changing around, an image of an old plot is still loaded into the gui on start up. How can I tell MATLAB to disregard that old plot?
I added a toolbar by adding
set(hObject,'toolbar','figure');
into the "gui_OpeningFcn". Now I decided that I don't want the toolbar in my gui any longer. But when I remove this line, the toolbar is still created. How do I tell MATLAB not to load the old stuff anymore? And where do those settings get stored anyway?
EDIT: I investigated a little bit, and this behaviour can be reproduced as follows:
create a new gui with the GUI builder and add plot
add the line "set(hObject,'toolbar','figure');" into the "*_OpeningFcn"
add a simple function into the plot (adding something like "plot(handles.axes1,[1:10], [1:10])" into the "*_OpeningFcn" will do)
run the gui and save the figure by clicking the save button in the toolbar
now when I remove "set(hObject,'toolbar','figure');" and "plot(handles.axes1,[1:10], [1:10])" from "*_OpeningFcn" and run the gui, the toolbar and the plot will still be displayed
I am sure this behaviour is intentional. But where are those settings stored, so I can reverse them?

I found out how to turn off the toolbar.
Select in the GUI builder view->Property Inspector
In the ToolBar field select "none"
Edit: I also found a way that the old plot is not loaded into the gui.
I created an empty "createFcn" for the plot.
and ran the gui once afterwards
then I deleted the createFcn again
But I very much doubt that this would be the standard way to achieve that. So please don't hesitate to give a better solution.

Related

How to not set focus to CrystalReportViewer automatically?

There is a problem i am facing, whenever I am setting the ReportSource property of CrystalReportViewer, the CrystalReportViewer control automatically steals focus from other controls. Like lets say I have a button I press which has the code to show the report in the report viewer, after this code is done, the CrystalReportViewer1 will have focus now. I dont want this to happen, I want the button to retain the focus. Also setting the focus back to the button is not possible gracefully as the time the CrystalReportViewer1 takes to render the report and set focus to itself is unpredictable, and there are no straight ways to know for sure when CR viewer is done doing its thing, there are some shortcuts/hacks which I dont want to follow.
I am using windows forms visual studio 2015.
Go to Properties of CrystalReportViewer and set
initialFocus = ParameteralPanel.
Please find Image here:

How do I build an Xcode shortcut for frequently used code snippet? [duplicate]

When I follow all the instructions (including apple's video) to drag text to create a code snippet in xcode, I get a different system behavior: all I see is the selection ibeam... I can't drag. It just ends up selecting text again. Am i missing some obvious Apple-ism?
Thanks
Yes, I ran into the same problem, and Apple-ism seems to be a good term for this issue :)
It works this way:
Select (or highlight) the code your want to turn into a snippet
EDIT: Click and hold (do not drag!) on any part of the selected text for a short moment (like 2 seconds, sometimes 8 seconds)
EDIT: The mouse cursor will change icon (not on El Capitan).
Now you can drag the code over the snippets library, where a green + icon will appear. EDIT: On El Capitan the green icon does not appear, but the frame of the code snippets window will become thinner.
This happened to me as well. The given solution didn't work but still needed to create snippets.
This is a workaround although not the best option, it works.
From Xcode, select the snippet window, and leave it selected.
Open a text editor app.
From Xcode, select and copy the code you want to use to create your snippet.
Paste it into your text editor and then select all of it.
Now drag&drop normally from the text editor into the snippets window in Xcode.
As said, not the best option but it works.
(Note for Xcode 8.1) Sometimes selecting the text and maintain the mouse button clicked for 3..8 seconds the cursor turns into an arrow and it's possible to D&D. Too bad it only works sometimes...
On High Sierra 10.13.3 and XCode 9 I faced the same problem. The decision that works for me is selecting code on a blank space before the first symbol and then dragging it to the snippets library.
Important: you need to drag only from the blank space (look at the screenshot below). Otherwise you will reselect your code again.
The cursor changes only when you start dragging, so don't be confused and don't wait until it changes.
I've run into this problem with Xcode 7.2 on Mac OS X 10.11.2 (El Capitan). Click and hold on the selection and the cursor never changes from the I-beam to the arrow for dragging.
Although MLBDG's answer is a usable workaround, I found that quitting and restarting Xcode fixed the problem. This might not work for everyone, but it's worth a try if you're having difficulty.
just highlight your text
copy in filter text field that u can see on your bottom of snippet library
paste the text
now select the text and drag from there to snippet library
The answer is really !undisobvious. You need to select a chunk of text. Then click on actual text characters, but without moving the mouse. Only then will the gods of XCode bequeath unto you a draggable snippet of code to do with as you please. Should you dare to miss the text and click in empty but selected space, the demons of XCode will strike down your selection and make you start from scratch. The unfortunate will not even realise this feature actually exists.
Hold option to duplicate it. For instance to make a duplicate case statement without destroying your copy buffer, then replace the case you cleverly have ready to paste during your search.
As a UI designer it is not obvious to me why this has such an unreliable twitchy implementation.

Changing color of function in Clion

Hi I'm having trouble changing the color of my function color. I'm using material theme and I change change almost all of the colors besides the function calls. Anyone experience this problem and know how to fix it? Is it listed under another heading? I'm currently using it for C/C++
In "Setting | Editor | Color&Fonts| C/C++" you see the code preview. It has "from context" selection option. Just click over the function call or any other word in preview to customize the color settings.
Note! You need to "Save as" new color scheme before you start change it.
I had the same problem and what fixed it was getting cygwin properly installed and set up. Once I did that, the highlighting options I selected showed up after the first build.

RStudio: can I pop out the source pane?

I have a dual monitor and I wish I can pop out the "source pane"(where I edit my code), so that I can edit the code in one monitor and track everything else in another.
Does anyone know if this is possible?
Thank you very much for your help.
This feature was just added to RStudio this week. You can try it in our daily builds (0.99.636 or newer):
https://dailies.rstudio.com/
To pop out your file to a new window, either:
Drag the tab outside the RStudio window to where you want your new code window to appear, or
Click the "Show in new window" button on the editor toolbar (it's next to forward/back)
If you try it, let us know what you think on the support forum.
I'm using the latest Studio and encountered similar needs. I found that ctrl+shift+number will suit my needs most of the time since it zooms to the pane that I desire and can also back to the full four window layout.
An additional trick is customize the hotkey to alt+number [1,2,3,4,5] so the pane zooms more handy with one click by your left hand on the keyboard.
Hope it helps.

VB6 - View Code will not display code

This is probably a really dumb question but i'll ask anyway.
I was wondering if there was any reason as to why a form wouldn't display its code when i click "view code" from the right click context menu in vb6?
It was working awhile ago so i'm kind of stumped.
Thanks
If forms are still not visible, try Window -> Cascade - This was the way I goit my forms visible again.
Maybe it is being displayed under something else. Check under the Window menu. Do you see it there?
Does the form display if you right click and select 'View Object'? If so, try double clicking on the form - that should display the source. You might also check the permissions to the file.
This is an old question, but since it's the first link retuned by a Google search, answering here may help many people.
Like someone else said, Window/Cascade does the trick, but with time it becomes annoying.
I have the same problem on my laptop with an external display. Closing the laptop cover (thus going back to only one display) fixes the issue.
An alternate way is to display the VB6 IDE on the main display (your main display is the one with icons on the bottom right corner). You can set your main display under System Preferences/Displays. There's a checkbox called "make this one the main display", it does not need to be your monitor #1.
Problem does not seem to occur if you have 2 displays side-by-side. Also, the fact that my laptop's resolution is not the same as the external display's resolution may cause the issue.
After taking these steps, you may have to restart the VB6 IDE to fix the issue.

Resources