To remove offset space towards left in MFC Tab Control - visual-c++

Hi I was looking into how I could remove an offset area that is found in the default MFC Tab Control Ex. I have tried using Deflate to the rectangle that holds the Tab, but the issue was the control seemed to in the old location which no coincides with the next Tab,
I was able to move the rectangle towards left but the control area of the moved tab is still in its old place, and it seems like only the change happened visually.

Related

Sublime Text 3 Sticky Split

Sometimes, when I use Sublime Text 3 for a while with split windows (using the Origami package), the border between splits gets "sticky", i.e. I cannot move it anymore. Which means, one of the panes all of a sudden has a fixed minimum size.
I can resolve that, back to normal, by using command+z, thus maximizing the current pane. But that's not exactly what I want, because it's annoying in cases when I wanted to have f.ex. equal size of two panes, but a minimized third pane. I have to manually resize all panes to what I wanted or had before, which breaks my workflow.
Has anyone experienced this before? Any known solutions around?
I have found out what the deal is.
It has to do with how the window was split, and under certain circumstances, f.ex. a split on the left side cannot be smaller than a split on the right side.
That's the case when the window has been split vertically first, and then the individual panes are being split horizontally. You split one of the panes, and the split can be pulled up and down to resizes the two panes, without any restriction.
Then you split the other pane, and, at first, the sizes look "free to resize", but then you start pulling on the frame to resize a pane, the frame will pop up beyond the height of the other pane's split pane.
The solution is, to resize both panes, if you want to have one of them smaller or bigger. I'd consider this a bug with a workaround.

Remove storyboard left and right padding on IB

I'm trying to remove the seemingly forced left and right padding on a storyboard, need to anchor my view on the border on the Storyboard. Doesn't seem to give me the option to anchor on the border in the interface builder.
Most probably not best practice, but the design looks weird with this padding.
How can I remove the white space on the left and right:
Update:
I have checked the constraint value, its bound at zero on superview.
It only works if I use -20 and 20 for trailing and leading. Need to change superview itself?
When your on the storyboard select the control you want to have edge to edge, and in the properties window if you select layout you will see the constraints that you've added.
You would want to double click on the 'leading margin space'and set it's 'constant' value to 0 (this can be a bit buggy sometimes, so it may show 0 already, simply remove the 0, re-enter the value 0 and save)
Finally repeat the first step and select the 'Trailing Space' constraint and do the same thing.
once done press on the square icon which visually adjusts the control into it's new constraints and it should be edge to edge.
If you are in Xamarin using Visual Studio I finally discover how to tackle this annoying problem.
Click on the widget or view in the storyboard. In the properties window->layout you can see the constraints. Click on the constraint.
Before I was using -20 for constraints:
Now I fixed by having a constant of 0 and changing the constraint configuration:
Just remove the selection on the "Relative to Margin" checkbox.
Open your Storyboard using Xcode and remove the existing Leading and Trailing constraints and add it freshly by Unchecking the Constrain to margin checkbox while adding Constraints.

How can I set the default orientation of labview windows?

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"

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?

How to determine visible region of a Windows in X Windows / Linux?

I have several nested X Windows - let's say - a scrollable window within a scrollable window (see the example below). In such case the main window contains (at least) the major scroll bars and the (major) drawing area they control. This drawing area on its turn contains (at least) a scrollable window batch - a (minor) main window, containing a scroll bar and minor drawing area.
During live scrolling of an inner drawing area the redraw procedure messes up, because I am using the XCopyArea to speed the process and move the contents that are valid and invoke the actual redraw routine for just the newly appeared content. This works fine when the inner drawing batch is by itself, but when nested within another one a problem occurs - when the inner scrolling-batck is partially visible (i.e. the major drawing area is scrolled) redrawing of newly appeared contents is clipped from the major drawing area and never actually redrawn, but considered to be so. When on the next scroll XCopyArea gets this supposedly-redrawn area it is actually empty. Finally this empty area show up on the partially visible inner scrolling-batch and it is empty. On the first general redraw message they are fixed.
If I can obtain the clipping mask for what is actually visible from (my) inner drawing area I can adjust the XCopyArea() call and redraw call and overcome the problem without the plan "B" which is redrawing all contents on each scroll bar movement.
Example: Developing a plugin for Mozilla Firefox and needing to determine the region that describes the visible area of "my" window, i.e. the one that is passed from the Mozilla system as plugin viewport.
If its really an X Window you get, and not a widget from some specific toolkit (like GTK+ maybe?) then you can use the XGetWindowAttributes function call.
This fills out a provided XWindowAttributes structure, which includes integers for the x and y position of the window as well as its width and height and other useful facts.
But in reality I think you are probably using the Mozilla plugin API inherited from Netscape, aka NSAPI, and in that case what you get is a call to your function NPP_SetWindow() at least once (and again if necessary because something changed) with a structure which contains the information you're looking for. Try looking at http://www.mozilla.org/projects/plugins/ for more information about the APIs you should use.

Resources