How can I force a ListBox to fill entire free area? - gwt

I put a ListBox into a tabele cell an want it to ocupy the whole cell (width="100% height="100%") and show as many rows as possible but:
not specifyng setVisibleItemCount causes to show a big dropdownbox (i want a list)
specifying setVisibleCout makes listbox to ignore height (it takes as much place as it needet to exacly display n rows)
i there a workaround ? (in Swing a number of wisible rows ia a funcion of height and I'd like it this way in gwt).
Thanks in advance

ListBox is a native GWT component, and that's the way it works. If you're using GWT 2.1 you can create your own CellRenderer

You could approximate a solution by calculating how many items should be shown based on the height you want.

Related

Is the following structure possible with "wrap" in flutter?

These boxes will basically be images of unknown resolutions. I want them to fit in such wrap structure that they are put one by one from left to right, but if there's more space in right column then the image should be placed in the right column instead of the left one.
I was wondering if this is possible with "wrap" widget, I tried it and couldn't get it to work without having to set a fixed height and wrap alignment to vertical. But I can't have a fixed height because there will be unknown number of images.
If nothing works, I will have to have a custom solution using columns or rows and I can do that but I just want to know if there's a simpler way to do this. Thank you in advance!

Can we do auto adjust of column size on the basis of length of the data in GWT

Since the way in the MS excel when we click on the grid it auto adjust to the size of the data in the grid. Can we have same functionality here also in GWt.
You can program this by hand by getting the offsetWidth of all elements in the dataGrid or whatever you are using and keep track of the max.

ag-grid is not rendering all my rows.

I am scratching my head on this one but I am starting to think it may be a bug in ag-grid.
I have a grid that is (inconsistently) only rendering 3 rows of data when I am expecting 5. There is a blank space for the 2 missing rows.
The pager says 5 rows, and the grid seems to know there are 5 rows (when I step through the javascript debugger). In fact, if I sort on the grid, or resize the window such that the grid provides scrollbars, the other 2 rows suddenly appear.
Has anyone seen anything like this?
----More detail but may not be relevant:
On this particular page, I have 2 grids. There is a main grid that has links in it, and when you click into a link, it hides the main grid and shows you the other grid. I was concerned that that was coming into play somehow, but I actually have seen this on another page I'm working on that has just 1 grid.
Based on various explanations I have seen online, I tried this and it appears to be working:
setTimeout(function ()
{
$scope.gridOptions.api.refreshView();
}, 0);
I call this after
params.successCallback(pResponse.data);
which invokes the grid's callback
Based on your observations that sorting or resizing the window makes the data appear, I get the feeling that the code needs to force the screen refresh somehow.
this.gridOptions.api.refreshView();
I had a similar issue and discovered that my gridOptions.rowHeight value did not match the actual height of my rows (I had a checkbox element in each row that was pushing the height taller).
As it turns out, the AgGrid row renderer uses absolute pixel location to calculate which rows should be visible. So if your actual row heights result in the rows not being in the exact position they are expected to be in, the renderer will skip them.
Ironically, the positioning code uses actual position, so the rows that do get rendered are positioned as if the skipped rows are still there, resulting in the blank space described by the OP.

SWT/JFace Column and Line Span in TableViewer

I need to span some column and rows in a TableViewer. The image bellow pretty much speaks for itself.
http://postimage.org/image/28l8re8lg/
I was thinking of implementing this by making some line invisible(white) but I don't think you can set individual border options for individual cells. Even if i managed this I would stil have to fix the alignment problem of the text in the spanned columns/rows ("Line Span" and "Column Span" in the picture).
I know about the Nebula Grid component, but I can use 3rd party components only as a last resort.
If anybody has any suggestions please share them:).
Thanks in advance.

Can you create a CellTable composed of CellTables?

This is a GWT question.
I need to create a hierarchical view of a data set. Let me describe what this hierarchical view is supposed to be:
Lay down a rectangle that is 640 by 480 pixels on your screen.
Now embed 4 rectangles inside the rectangle from the previous step.
The 4 rectangles shall evenly take up the space from the enclosing rectangle.
Continue recursively embedding 4 rectangles inside each 4 rectangle...
So on and so forth until a stop condition (like stop recursing at level N).
I plan on doing this with GWT's CellTable. I know how to make a CellTable out of the various out-of-the-box Cell's (what I mean to say is: all the classes that implement the Cell interface ).
But I can't figure out how to make a CellTable of Widgets... or a CellTable of CellTables. I guess my question boils down to... How would you make a new Cell type that is: WidgetCell or CellTableCell?
UPDATE:
I found an answer that describes how to make a Cell out of a Widget: how-can-i-put-a-widget-in-a-celltable-cell
Given the above answer, is my original idea of making a CellTable out of CellTables practically feasible? Is there a more elegant solution? Am I on the right-track?
CellTables do not support widgets. Grid or FlexTable might work better for you, since they do accept widgets - you could make a Grid of CellTables, for instance. Unfortunately, there is no built-in solution that accepts widgets and provides paging.