Windows Forms TableLayoutPanel 2 Rows use all space - windows

I want a TableLayoutPanel with 2 Rows. The second row is 200px high. The first row the rest. If resize, only the first row resizes.
How to implement?

Anchor the TLP to the bottom. Click the tasks glyph (upper right corner), Edit rows and columns, Show = Rows, select the 2nd row and change the Size Type to Absolute.
Also note that you don't really need a TLP for this. Just use a regular Panel and dock or anchor the controls to the bottom.

Related

jqGrid make rowNum depend on vertical grid y-size

I have jqGrid which size is dynamically calculated on window resize as follows:
$(window).bind('resize', resizeTable);
function resizeTable(){
$("#jqGrid")
.setGridWidth($("#tableHolder").innerWidth()),
.setGridHeight($("#tableHolder").innerHeight());
};
Having constant rowNum, scroll bar appears on grid if y-size isn't enough to hold given number of rows.
I want rowNum to be calculated automatically to display only rows which fit in a visible area of the grid and make others move to next pages and have no scroll bar. Is that possible?
You don't included in your question how you calculate the size based on on window resize and which more important which options of jqGrid you set and when you set (in which callback/event).
In general one can either set height or rowNum. I personally prefer to specify rowNum (which value could be calculated based on the window resize) and to use height: "auto", which is default value of height in free jqGrid. As the result, the grid will never have vertical scroll bars.
Additionally I prefer to use top pager (toppager: true) instead of the botom pager (pager option) if the height of rows of the grid could be variable.

Cocoa Resizing Two Stacked Tables

I have a view with two vertically stacked Table Views. When I resize the application window, the lower table view expands. This is because I didn't specify a height for it. It has a fixed distance to the bottom of the window and a fixed distance to the table view above it. If I attempt to remove the fixed height for the upper table view, the constraints editor complains. Is it possible to have both table view expand equally when I resize the application? If not, is the possible to allow the upper table view to be resized when the application is running?
I found a way to do this as long as there is some sort of control between the two tables. A label will work fine. Using constaints:
For the control in between the two tables, set the Alignment constraint to "Vertically in Container. This will perfectly center the control. You can offset it above or below center by adding a positive or negative value in the combobox next to the option.
For the top table, pin the top of the box to the top of the window or any other place that fits your design.
Set the bottom constraint to some offset from the control in step 1.
Set the bottom constraint of the bottom table to something fixed like the bottom of the window.
Set the top constraint to some offset from the control in step 1.
Be sure not to set the height of either table.
When the window moves vertically, the control in step 1 will be moved to keep it in the center plus or minus any offset you provided. The two tables will be expanded or contracted accordingly.

VB / C#: Resizing two controls equally

I have made a window in which I will be having two groups/panels and some buttons in between them. I want to code the resizing behavior in a way that when the window expands, the two panels increase their widths while keeping the distance between them constant.
Please see this mockup:
As you see above, I want the 'Local' and 'Server' Panels to resize while keeping the distance in between them same. If I use anchors (Top+Left+Right+Bottom), the left panel will overlap the right one and the right's width one will go out of the window. I want them to share the increased width of the window equally.
As for the buttons in between, I have kept ancors as Top only. By removing Left anchor from button, it automatically places itself in the center of the window when window is expanded, which is just the way I want it to be.
Any ideas how to manage resizing of panels?
Thanks.
Use the TableLayoutPanel control.
First add the TableLayout to the Form and set its Dock() property to Fill.
Next you'll need to setup 3 columns and two rows. Add the two buttons to the middle column with each one is in its own row. Afterwards, setup the column values so they are like this:
Leave the rows at 50% on both.
Now add your two GroupBoxes to the 1st and 3rd columns in the 1st row.
For both GroupBoxes, set Dock() to Fill, and RowSpan() to 2.
For the top Button, turn on only the Bottom Anchor.
For the bottom Button, turn only the Top Anchor.
For the TableLayoutPanel, set Padding() to 5,5,5,5.
Here is what it looked like when I was all done:
Resize the window and observe how the controls behave...

How can I blend in my SegmentedControl in a UITableView better?

As you can see on the screenshot the segmented control is placed rather ugly this way.
I need it in that place, meaning below the section title and before the second cell for that section. How could I make this better?
I can think of two suggestions that would improve the appearance. The first would be to increase the height of the table cell (just that particular table cell, not all of the cells in your table) so that the whitespace margin at the top and bottom of your segmented control is equal to the margin you currently have on the left and right of the control.
Another solution would be to move the selection of the value for this setting into a separate tableView controller that you drill down to. So that cell would show the current value, but tapping the cell would take the user to a new view where the user could select to change the value.
Here is an example of this from the Instapaper app settings page that I think looks pretty clean.

Nscell Size Not Increasing With Row Height During Text Edit

My NSTableView has variable height rows. The rows correctly resize after an edit of a cell has been completed, and during/after resizing the column/table. The Row also correctly resizes while a user is typing into the text cell.
However, the cell itself does NOT resize during editing to match the height of the row. Does anyone have any ideas on this? In this screenshot one end-edit has occurred already (which is why the text area is larger than 1 line) but there is currently enough text in the cell to account for about 5 lines, thus the height of the row is not matching what should be displayed.
Both the textview and the cell have to have their autoresize set if you want them to automatically scale.
It looks like the cells in the Tag Name column are properly set to resize but that either the cell or the textview in the value column has not been. Check the sittings in Interface Builder.

Resources