I have a grid which has 5 level hierarchy(Master-detail) .So when i expand to 5 the level grid,it's height becomes so small and scroll bar comes in.Is there any way to show child grid take full height and hide the parent according?
Related
I want to design 5 views - they have different sizes, but I can't drag and drop 5 UIViews to my View Controller.
Where is the position for view 4 and view 5?
You should set your view controller's Simulated Size attribute to Freeform inside the Size inspector. After that, you can enter any value you want there.
However, keep in mind that the size you are setting up here is only a simulated size. If you want your controller to be scrollable, you will have to set up a scroll view and put these views inside it.
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.
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.
I am struggling with this stuff for a few days. I am having a view controller in which I have a scroll view and above it a content view. In the content view I am displaying some text from web in a label. I am using a view controller of free form size 600*1000 for my designing purpose.I have given the following constraint to my content view -
1)pinned to the edges of scroll view.
2)content view width equals to superview width.
3)content view height equal to 900.
My scroll view is working perfect.
So now I want that whenever my text increases then my label size would increase thereby increasing the height of my content view automatically. So how to do so. Any answers are most welcome. Thank you.
Set the number of lines for your UILabel to 0.
Add leading, trailing, top and bottom constraints to UILabel.
Set number of lines to 0 does the trick, as the content increases UILabel will automatically adjust the height.
I have a window with two custom views stacked on top of each other. I use auto layout constraints, as follows:
Top view leading, top, and trailing edges are tied to superview.
Bottom view leading, bottom, and trailing edges are tied to superview.
There is a fixed vertical space constraint between two views.
Bottom view has a fixed height constraint.
Top view has a it's compression resistance set to 751.
So far so good. The idea is that the bottom view height is fixed and as the window is resized, the top view height adjusts to compensate.
Both top and bottom views have other views/controllers loaded in, as appropriate. The bottom view ends up containing an outline view with a half-dozen entries. I would like that outline view not to scroll. In other words, I would like to automatically adjust my bottom view fixed height constraint to match the height of the outline view required for it not to scroll.
Ideally, I'd prefer to solve this with auto layout without having to write code. But, if that's stretching beyond what auto layout can do, code help would be appreciated as well.