How can I set the default orientation of labview windows? - layout

Whenever I open a new labview project, it opens two small windows, one for the block diagram and the front panel. Since using labview effectively requires simultaneous use of both, is it possible to set things up such that, upon starting a new VI, it opens these two windows in pre-determined positions and sizes?

I do not know setting to do so (and think there is no such setting), but your problem is easily solvable if you press ctrl+t when new vi is opened.
ctrl+t will set front panel on the left half part of the screen and block diagram on the right part. Pressing ctrl+t a second time will set the panel to top half and diagram to the bottom half.
Shortcuts In LabVIEW

Another workaround:
Create a new empty VI
Resize and reposition the front panel window as you wish
Do the same for the block diagram window
Save the VI as a template (.vit)
Double click the template to use it (position and size of windows will be as they were when saving)

Alternatively if you want to be doing manually everytime. You can press WIN+LEFT on one of the windows and WIN+RIGHT on the other. This will evenly distribute the two windows over the screen.

You can set window position for individual VIs by pressing Ctrl+I to open the VI properties, and setting the desired appearance under "Window Size"

Related

How to toggle the external screen in Windows 10

I have a laptop connected to an external monitor. Need to do a presentation where I have Powerpoint open on one screen and Excel on another screen and toggle the external screen
So: the laptop screen should always show Excel but the external screen should show either PP or Excel.
I put display into extended mode, put PP on a second screen. so far so good. But then I need to switch external screen to Excel. If I change to Duplicate mode, my PP moves to the main screen and I cannot switch easily back.
Is there a way to quickly and easy switch only the external monitor between main and extended screens?
You need to be on Extended Mode always. Based on your requirement, you can manually drag the respective Application (in your case Excel/PowerPoint) to whichever screen you want.
You also can tweak the PowerPoint Slide Show setting to define which monitor to use and also whether to use Presenter View or not (refer screenshot)
Hope this helps!

How do I find the control to test against with CodedUI in VS 2015?

I'm using VS 2015 Enterprise. I'm new to CodedUI testing. I've added a CodedUI test project to my solution. I've created a simple test, clicked on a button, selected a radio button, etc.
I've been following a Pluralsight course titled "Test Automation with CodedUI". I want to find a control on the WPF form, but once I select the control finder in the test builder and move the mouse off to the running application, it is no longer a bulls eye. I don't understand why its different than what's shown in the Pluralsight course. I think the instructor used VS 2012. Could that be the reason?
There are subtle changes between versions. After clicking the assertion builder button in the Coded UI recorder then, as you move the mouse pointer around the screen (do not move it too fast or you will confuse yourself), you should see a blue rectangle drawn around parts of the screen. As you move the mouse pointer carefully you should be able to select larger or smaller sections, corresponding to higher or lower items within the hierarchy of controls on the screen. Click on a control of interest. You should then see a window showing the properties of the selected control. There are four arrows (up, down, left and right) in the new window. Click on these to navigate around the control hierarchy. Note that and 'up' followed by a 'down' will seldom return to the same control. The 'up' moves the parent control and the 'down' moves to the first child.
My suggestion here would be to use the keyboard shortcut to enable the control finder. When you hover over it with your mouse you should see it - if I recall correctly it's "Alt + H". Basically you'll move your mouse to the control you want to identify, then do the keyboard shortcut, then click. It should identify the control correctly at that point.

Hot to prevent recalculating window sizes in vim?

I show what happens step-by-step to explain the case:
This is my layout:
After I run :vs new to create new file in the separate window:
Now you can see that the leftmost window with directory tree is unexpectedly expanded by several columns. And and I close the new buffer by ^Wc or :close the rightmost window expanding again!
What's going on? Is there any ways to "fix"/"stick" window sizes. Windows like water - they are constantly resizing(
Option equalalways when set, makes Vim equalize the windows sizes when a window is closed or opened. You can switch it off by using
set noea
or you can change its behaviour by adding the eadirection option to control in which direction windows should be equalized.

PyQt QTextEdit text selection without moving the cursor (like ubuntu terminal)

I've developed a shell (imitating the ubuntu terminal --> can only edit text after current prompt) by a PyQt QTextEdit.
The thing is when I select some text, the cursor moves as I'm selecting this text (so it disappers from the current command line) and I would like the cursor to stay where it is (only when I select text because I want it to move when I move it programmatically by textEdit.moveCursor(...)) at the same time I'm selecting the text.
Does anybody have any idea of how could I do that?
My solution for now, is to save the position at any change of it (except when it changes by a click), and when I copy some text en paste it, it'll be automatically pasted in the last position the cursor was before the click. That works perfectly but it's "ugly" for the user because, as I said, when he selects the text the cursor disappears of the current line and is where the user is selecting the text. Not like in ubuntu terminal.
Thanks in advance! And sorry for my english.
Adri
I don't see an easy solution to implement this with a text editor API. A terminal is a hack, basically. It mixes a read-only element (anything above the current prompt) with a text editor.
My approach would be to create two text editors, make one read only and display the results of all operations there. If you hide the borders of the two editors, then it will look like a single one. You may have to forward a bunch of events (like scrolling with the keyboard) to the read-only display.

How to restore VBA Editor to its initial settings?

How to restore the VBA Editor to its intial settings ? I have some troubles with macro and projects explorer windows settings, after some bad manipulations.
The only way I know how to accomplish this is to edit the registry.
Close All Office programs
Open a command prompt and type regedit
Navigate to HKEY_CURRENTUSER\Software\Microsoft\VBA\6.0\Common
Right click on Common and Export to save the *.reg file somewhere safe. This is your back up. Double clicking this file will restore your current settings.
Right click on Common and Delete it. Doing this will remove all of
its subkeys that hold your personal settings.
The "Common" key will be recreated the next time you close the VBA Editor along with any changes to the settings you may make.
I have the same issue, it's simple:
TOOLS
OPTIONS
DOCKING
Then select Object Browser, Project Explorer and that's all.
I had the same problem and realised that if I double click the blue heading of a minimal floating menu, such as the Project-VBAProject menu, it would resize and fit in with the other menus that are expanded. With a bit of moving around and double clicking the headers of the menus that I had selected from the VIEW option, I could get the screen back to the way it originally looked at the default setting of the VBA editor.
Phil
Solution Using a Mac and Excel 2016.
I found that I could drag the, e.g., project explorer (pe) window toward the edge of the vb window and the outline of the pe window moves and adjusts once you get close enough to the edge. This also works with the other windows as you bring them into view.
My default view is project explorer upper left, properties lower left. To return these to be in that order, drag the one to that location (which will fill that whole area) then drag the other one right on top of that one. That stacks them in the same column and then you can adjust their size within those locations.
I had this same issue and fought with it for literally 2 days. Finally figured it out!!!
xD First close the Project Explorer and the Properties windows using the X at the top right. Then go to Options under the Docking tab. Uncheck all boxes. Close the options window and if desired check to see that everything is undocked. Now go back to Options>Docking and check all the boxes you had checked (default is all but object browser). Your windows should have returned to default.
This may not solve the OPs original question of "default" for all, but in my case and possibly others I was looking to re-dock the "Project Explorer" and have modules pop up next to it like default. I'm not sure about other settings, but this is how I restored the above behavior.
In the project explorer right click and select "Dockable". Then insert a module and maximize it. This should restore what I consider default behavior.
Actually, it is very easy. You just have to go to View Tab then Click on the Project Explorer & Properties Window. It worked for me because I lost these two and now I got it by doing this. I hope so you will get the same result as well. View the image for more clarity.
Simple steps. Works for Mac , maybe windows too
Close all the tabs in the VBE
View --> Code . This will occupy entire space
After that ,view --> project explorer. this will pop up a tab, drag that tab to the top left corner. It auto fills into a small column which you can drag according to your preference .
Now select view --> properties window and drag the tab to bottom left.
Additional step ( if you use locals window )
Select locals window from view and drag it to the bottom.
Right click any of the window you want to move and click "Dockable". This should allow you to move all the windows as you want and place them as you wish.
I had all menus and windows missing, like no "File", no "Edit", no "View", etc.
Here's what I did:
Closed Excel
Opened the Registry Editor
Navigated to HKEY_CURRENTUSER\Software\Microsoft\VBA
Right clicked on VBA and renamed to VBA_old
Closed the Registry Editor
Opened Excel
Opened Visual Basic
…and voila, VBA was back to normal!
After that, I:
Reopened the Registry Editor and saw that VBA had been recreated
Deleted VBA_old
I'm not aware of a 'reset' command but the starting point would be to go to the View menu and start by setting the Code, Project Explorer and Properties windows and then the Toolbars>Standard (toolbar) perhaps?

Resources