How to remove sort direction gray background on JFace table - jface

I am performing sort on JFace table columns, and using the sort directions SWT.UP and SWT.DOWN to indicate the directions of sort, but gray background is getting displayed on the empty part of the column where there is no data, how do I remove that?. If that is not possible how can we place images of up arrow or down arrow on table header?

Related

How can I get my Picker to vertically align in React Native?

I have created a Snack here:
https://snack.expo.io/#deltanovember/dtest
using the libraries react-native-easy-grid and native-base.
I've created a basic table which appears as follows:
The far right column isn't properly vertically aligned because Score1 appears slightly above the rest of the row, whereas Score5 appears slightly below the rest of the row.
How do I get the far right column aligned with the rest of the table?
The columns as a whole are vertically aligned. You should render row by row, because the data inside a row belongs together and the content of each column is not necessarily related to each other.
I've updated your code and created a snack. Check this out: https://snack.expo.io/#mukeyii/grid-vertical-alignment

Rearrange rows in slick grid

We have requirement to rearrange slick grid rows.
I have up/down icon in each row, I want to achieve animation like, clicking 'up' icon should move rows up by '1' position, but cursor must not shift its focus from current row. And other rows should rearrange their position in respect to the 'clicked row'.
Please suggest solution to this problem. Thanks
You essentially want a sorting function. The method I'd choose depends a bit on how the back end database stores the sort order, if you are persisting to a database.
If you are not persisting the data,
create an extra column SortOrder, sort by whatever other columns you want to be the default sort order and set SortOrder to 1, 2, 3, ... , n
create the buttons using a formatter, and make the up/down buttons call javascript that
switches the sort number with the row before/after
resorts and rerenders the grid
sets focus (if necessary) to the desired row using grid.setActiveCell() and grid.focus()
Pesonally, I store SortOrder as an int database column, and set it to all zeroes initially so that secondary default sort columns can be used if no custom sort is desired. However the sort index algorithm is significantly more complex.

How to remove extra lines in the table cell of Jface table

Im using OneDrawLabelProvider to display multiline text in Jface table, but all the rows are of same height even for the ones which does not have multiline, how do I remove remove extra lines for the cells that does not have multilines?
You can't. JFace / SWT tables always have rows of the same height.
Eclipse Nebula NatTable does support different row heights.

How to scroll PyGTK ScrolledWindow to a certain row of a nested table?

I have a program in PyGTK which has a ScrolledWindow and a Table nested in it. The table rows can be of a different height. What I'm trying to find is a way to scroll the view so it begins from the selected row. I know how to move the scrollbar to a certain position using the scrolled_window.get_vadjustment().set_value(), but I do not know how to find the scroll position of the table rows.
Alternatively, maybe I'm using wrong widget and someone can point me to the right one? I'm trying to achieve the following behaviour: the screen shows the rows of a table, the top row is the currently selected object, when the user presses up or down buttons, the whole table scrolls down or up, so the previous or the next row becomes the top row.
Nevermind, I found a solution: you have to use the child widget get_allocation() function, which returns the bounding rectangle of a child widget relative to the scrolledwindow, so child.get_allocation().y is the answer to my own question.

Vertical Scroll bars and displaying data

Im trying to control either two richtextbox's or two listboxs scrollbars with 1 vscrollbar. I want to display some data in a table like format, with 1 list separated from the other for asthetic purposes and would like the information to stay together line by line.
Does anybody know how to achieve this or perhaps a better way of doing this?