tabulator: how to set the horizontal scrollbar on top of the table? - scrollbar

I am using tabulator to create a table with a high number of rows and columns.
Is there a way to have the horizontal scrollbar on top of the table ?

Related

Can you make a table with resizable columns, where the columns start with an "auto" width that fits the contents, in react-table?

I would like to make a table with resizable columns, where the columns start out automatically sized so that they are the width they need to be to contain the text that's in that column.
I have been able to achieve these separately, but not together.
It seems that the problem is that react-table requires you to use either FlexLayout, BlockLayout, or AbsoluteLayout to be able to resize the columns, but this causes table elements to be replaced with divs. When the divs are giving an "auto" width, each one individually fits to its contents, which creates a "brick wall" of stacked divs, and not a table where all the cells in a column are aligned.
Here is an example of the brick wall effect: https://codesandbox.io/s/nervous-goldstine-s12pve?file=/src/components/DataTable.js
Commenting out line 11, which sets the column widths to 'auto', will fix the alignment issues, but the columns will be wider than they need to be. If instead you comment out line 30, the column width issue will be resolved, but the columns will no longer be resizable.
Is it possible to have both of these features?

R Flexdashboard - Add horizontal scrollbar on Datatable

I am creating a flexdashboard for a project. I have valuebox in the first row. Second row has a table and 3rd row has an interactive plot.
Problem Statement: The table has about 20ish columns. I want a horizontal scroll bar on the Datatable. When I try to use the horizontal scroll bar which is on the entire page, the table looks distorted as shown in the picture. I want all the three boxes to have same width and have a horizontal scroll bar on the second row.
Secondly, I want the table to fit the entire box.
Code:
R Markdown file can be downloaded from the link below:
https://drive.google.com/file/d/1IY43xY_Cuu662e78cDyV0L5Zkg9ef0QV/view?usp=sharing

AdjustToContents so that scrollbar is not on top of data

I have a table with a varying number of rows and columns and I'd want to adjust the size of the table so that there is no extra white space.
What I've tried to do is:
myTable.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContentsOnFirstShow)
This works well but if the window is fixed or there are too many rows to show. Then suddenly there will be scrollbars that appear and block the view of some of the table data. I would want the scrollbars to be to the side of the table and not on top it.

QVBoxLayout - setting alignment

I have QGroupBox which using QVBoxLayout:
QVBoxLayout *vbLayout1 = new QVBoxLayout(groupBox1);
vbLayout1->addWidget(label1);
vbLayout1->addWidget(slider1);
groupBox1->setLayout(vbLayout1);
A height of the group box is big enough to store more than two elements so when I add to the layout only two elements as above, the first appears in the middle of the group box and the second in the bottom. I want to set an alignment where elements are placed in the group box from top to bottom with some small spacing. How to achieve such alignment ? How set spacing between elements ?

Is it possible to get a custom ItemRenderer to scroll the DataGrid rather than its cell?

I'm having an issue with a custom ItemRenderer I've written for a DataGrid. With this ItemRenderer, it's possible that the contents could exceed the width and height of the DataGrid cell - and when this happens, scroll bars appear, letting me scroll the individual cell.
What I would like, however, is that when the contents of the cell are too large, the entire DataGrid scrolls, rather than the individual cells.
Now, when I set the custom ItemRenderer's horizontal and vertical scroll bar policies to "off", I get the vertical scrolling on the DataGrid that I want (the individual cells stretch to accommodate the full height of the contents) but I don't get any horizontal scrolling. Instead, any content too wide for the cell is clipped. Incidentally, setting the DataGrid's horizontal scroll bar policy to "on" has no effect, the scroll bar gutter is drawn, but nothing scrolls
Is there a way to force the DataGrid to scroll horizontally when my custom ItemRenderer's contents are too wide for the cell?
You may have to find a way calculate and expand the size of the DataGrid horizontally in a canvas so that it shows all the cells, and the scrollbar would appear as part of the canvas.

Resources