Glade 3.18 + GTK3 - Make children keep internal size - user-interface

So i have a GUI with a toplevel GtkWindow that has alot of boxes and windows beneath it. See image below
the problem is when a user resizes window1 (downwards) , the bottom element, i.e statusbar2 only enlarges and fills up the rest of the available area.
The notion of a status bar is that it should be always the same size, like 80 px of height. What I want to do is that when a user resizes the window, the internal components stay the same relative height and width. Atleast the status bar. So when i drag down to enlarge, the box3 item should only enlarge. The statusbar2 should "hook" onto the bottom edge of the window and stay the same size.
This must be doable surely?
If you need the glade file, I might be able to upload it
Any help is appreciated!
Regards

You'll want to set the status bar's vexpand property to False, and set the vexpand property to True of whatever widget(s) you would like to absorb the extra space.

Related

MFC: limit the size of child control from the code of control itself

Say, I have a CListCtrl-derived control. I want it to be always square (i.e. it's width and height should be always equal to each other).
The control resides on a dialog (CDialog-based), it is resized once the dialog is resized (the control is resized using SetWindowPos()). What I want to achieve is to make it impossible to resize the control improperly: the control must always have equal horizontal and vertical dimensions regardless of what is passed to SetWindowPos.
Of course, I can control the values that are passed to SetWindowPos. The question is: is it possible to control the size of the CListCtrl-derived control inside the code of that control itself?
If you subclass the control and have it handle the WM_SIZING message you can constrain the resize in any way you'd like. Just modify the RECT structure that's passed with the message.

Resizing UWP Window on User Drag

I am trying to change the size of the UI Elements within a UWP Window on the change of the size of the window itself, such as clicking the edge of the window and dragging right. However, on increase of size, there seems to be Bounds set on the creation of the Window for the maximum size of the content, is there anyway to bypass this Bounds?
Try setting the UI Element's HorizontalAlignment and/or VerticalAlignment to "Stretch". Alternatively, if you want to scale it too, you may put the whole thing in a ViewBox. There are really quite a few options to achieve what you want.

A control in NSTableCellView is being moved to right automatically after resizing or scrolling

I'm trying to implement a counter view that shows items count in NSTableCellView.
The weird thing is it gets moved to right automatically after resizing window or scrolling the NSOutlineView which has the NSTableCellView.
Here is some screenshots of it. You will be able to see the counter view which shows "42" being moved to right after resize the window.
Following is the init state of the counter view.
Following is the state after resize window.
Following is difference between init position and the position after resize window.
Cell Autoresize Property
Count Button Autoresize Property
I'm guessing this is related to scrollview but I was not able to find more clues about this issue. BTW, official Mail App on Mac works as same with this but the difference is the counter of the Mail app is being changed right after launch so it does not being moved after resize window.
Anybody knows about this? Any thoughts would be appreciated.
Here is a link that allows you to download the sample project that apple provides and you can reproduce what I'm facing.
Sidebar Demo App that providing by Apple.
You just need to change Deployment target before you run it from Project -> Targets -> Deployment Info section.
If I interpret the autoresizing screenshots correctly, the '42' control is behaving as specified. You've pinned the right side of the '42' counter to right side of the cell. And that is where it stays, glued to the right side of the cell.
The cell is pinned to the left side of the tableview and that is where it stays, glued to the left side of the tableview. You have not pinned the right side of the cell to anything and so when you resize, the right side goes where it pleases, only maintaining the specified width of the cell. If you want to glue the right side of the cell to the width of the tableView or column (not sure which it is), pin it. Do specify a minimum width for the cell. If you don't specify a maximum width, or fixed width, the cell will stretch and shrink with resizing. If you fix the width, only the right view or column will stretch.

How do I make a WrappingTextField fill the entire Window?

I have a Window and a WrappingTextField.
I want the WrappingTextField to always fill the entire Window. Even when the user is resizing the Window, and when it is in full screen.
No matter which options or constraints I choose in Auto Layout, it only resizes with the Window horizontally, but its height remains the same, even if the height of the Window grows.
How do I make it fill the entire Window, and stay that way?
By WrappingTextField I'm assuming you mean an a standard NSTextField object with it's Layout set to Wraps within Interface Builder.
The resizing behaviour of an NSTextField is influenced by its Content Hugging Priority. By default Interface Builder sets this at 750 for the control's Vertical dimension, and this is probably what's preventing your text field from resizing the way you want it to. Give it a smaller value - like say 100 - and the problem should resolve.

Mac OS X/Cocoa: create "docked" sidebar that reduces maximizable area, like the Dock

When the OS X dock is shown, it "reserves" some screen area and prevents maximized windows from going behind the dock when maximized. How do I make my own Cocoa application do the same?
A window's "maximizable area" is based on the screen's visibleFrame.
[[NSScreen mainScreen] visibleFrame]
The returned rectangle is always based on the current user-interface settings and does not include the area currently occupied by the dock and menu bar.
Because it is based on the current user -interface settings, the returned rectangle can change between calls and should not be cached.
The rectangle defining the portion of the screen in which it is currently safe to draw your application content.
There is no mention of being able to adjust this visibleFrame rectangle, so I do not think you will have any success influencing the "global" Zoom size.
However, if you only want to adjust the Zoomed size of your app's window, return a smaller rectangle in the NSWindowDelegate method windowWillUseStandardFrame:defaultFrame:.
The standard frame for a window should supply the size and location that are “best” for the type of information shown in the window, taking into account the available display or displays. For example, the best width for a window that displays a word-processing document is the width of a page or the width of the display, whichever is smaller. The best height can be determined similarly. On return from this method, the zoom: method modifies the returned standard frame, if necessary, to fit on the current screen.
This will allow you to take into account a "docked sidebar" when Zooming your app's windows. Other apps will be resized on top of the docked sidebar.

Resources