CellList: How to set row height dynamically? - gwt

I have a CellList which will have fix number cells in one page, i would like the cells extend to fill the whole CellList.
Suppose the CellList height is 100px, the cell number is 10, then one cell/row will be 10px, if the CellList height is 500px, each cell/row's height will be 50px.
The problem is, how to control the row height after table rendered, i tried to addLoadingStateChangeHandler on cell list and when onLoad i use GQuery to resize the cell height, but seems no effect.
Yes i can get each row's height beforehand, but how to apply to the CellList's CSS?
Any ideas on this?

Problem solved, when creating a new cell, specify its height(because we know the height beforehand), when resizing the CellList, just redraw it by specifying a new height.

Related

Random table view cell height is not working perfectly

I am designing a chat app in which I am using the UITableViewAutomaticDimension property of table view when I am setting the label lines to 6 then all cells height is according to the text which label contains but when I increase the number of lines for label then some cells have extra height. Even when scrolling it then cell height again changed.You can check the image so that you can understand it easily thanks.
You need to give label constraints from top and bottom, rather than center vertically.
Give vertical content hugging priority

GWT DataGrid resizes the columns

From what I understand the DataGrid auto resizes the columns.
What I would like is DataGrid to respect the column widths I set, and to show the horizontal scrollers accordingly. Is there a way to achieve this?
DataGrid gives you complete control over the width of its columns.
For example, if you set the width of all columns in pixels except for one column which has a width equal to 100%, then all columns will have exactly the width you specified, except for the percentage column which will shrink or expand based on the width of a DataGrid itself. If you want all columns to have fixed width, then you should set the width of the entire DataGrid explicitly in pixels.
There is also an important .setMinimumTableWidth method. You can use it to tell the DataGrid that it can resize with the width of its parent container, but never be smaller than a certain number of pixels. In this case, if a parent container is too small to accommodate all columns at their desired width, the horizontal scrollbar will appear.

Setting fixed height for all cells at once in iText 2.0.7

Is there anyway where we can set the height of each cell to a particular height? I created multiple cells using PdfPCell,the height is common to all the cells so I wanted to set the height of each cell at once to shorten my code, currently I am doing it using the PdfPCell's setFixedHeight method.
Retrieve the default PdfPCell and set its fixed height. All the cells of the PdfPTable will have the same height afterwards. This will have to be repeated for each table though.

JasperReports: set textfield height to height of other element in band

I have several textfields on a single row in the same band. The first of them is having a larger font than the rest. However, the size of this font might change for each record. How can I set the height of the other textfields to be dependant of the height of the first one?
Thanks for your help,
Andreas
On each field in the row set Stretch Type to be Relative to Tallest Object.

Gwt VerticalPanel Cell Height

I have a horizontalpanel with 3 verticalpanels inside.
In the verticalpanels there are custom widgets
I need all verticalpanels has the same height (even if they have different number of widgets inside) and a button in the empty space.
So, I put all panels height = 100% and the buttons height = 100%.
The problem is that the verticalpanel cells height are bigger than my widgets, so it left a space between all verticalpanels widgets.
Here is an example
How can I adjust the verticalpanels cells height to my widgets height. My widgets are not images like in the example, so i can't know the widgets height.
I have a lot of time in this problem, anyidea will help
Thx!!!!
Haven't tried it, but this should work or at least give you something to start:
VerticalPanel.setCellHeight(yourWidget, Integer.toString(yourWidget.getElement().getOffsetHeight())+"px");
What it does:
setCellHeight() sets the height of the cell the widget is in you pass to the function.
The second parameter in the function is the height of that cell. This gets a little tricky because you don't know the height.
With the getElement() you get the Element of that widget in the DOM of the browser, on that element you can call getOffsetHeight().
getOffsetHeight() returns an integer so you need to cast it into a String and concatenate "px" to it so the browser knows it's pixel and not em or something like that.