JavaFX - Set Style of TableView's Header - javafx

I am trying to modify the style for the column header of a Table View in JavaFX. Currently, my code looks like this:
table.lookup(".column-header-background").lookup(".filler").setStyle("-fx-background-color: green");
table.lookup(".column-header").setStyle("-fx-background-color: red;");
And this is what it creates: image
However, I would like the entire header to be colored - product, unit price, discount, total.
Thank you in advance.

Related

Place DataBand in a certain space

Im making a report with Stimulsoft Designer, and I place a lot of information. Now I need to place a data band for showing a list of phones in a certain space, but the only position on which the data band appears is on top (after header) and full width. That's not what I need, I need something like this:
I tried to create a "Data" square, and other options shown there, but it doesn't work. What I'am missing?
The solution is to add a panel with that shape, and insert the databand inside the panel

How to create a button with an image and text WatchKit

I want to create a tappable button with an icon and some text.. kind of like how the map app does it. See the attached picture below.
I've currently tried having a button that is set to the Group mode for content. However, this makes the background clear and I wasn't sure if there were any better options. Another option that came to my mind was creating a table view with one cell that took up half the width but that would be very hacky as well.
Just create two groups. Then you can change the background color, add an image and text label. To make it clickable simply add a tapGestureRecognizer to the group and it will function just like a button.

How to create a button beside header text in QTreeView?

I need to create a button beside header text like this for sorting.
The requirements are:
the button and the header text should be in a group to be aligned together
when I click on the button up_arrow, the list will be sorted (in the picture it is not sorted :D), and the icon changes into down_arrow for sorting in the opposite order.
How can I do this?
If you're happy with the default indicator's look and behaviour the following code should be sufficient:
//Set up QTreeView, add model etc...
tree_view->setSortingEnabled(true);
QHeaderView* header = tree_view->header();
header->setSortIndicatorShown(true);
If you would like to customise the behaviour of the sorting, have a look at QSortFilterProxyModel.
To style the indicators you could perhaps use Qt's Style Sheet:
QHeaderView::down-arrow {
image: url(down_arrow.png);
}
QHeaderView::up-arrow {
image: url(up_arrow.png);
}

Unable to style a cell tooltip of ngGrid

I am trying to add a tooltip to my cells. Using the title attribute works, but the style is different from the rest of the page (bootstrap styling) http://i.stack.imgur.com/PQMmj.png
Changing the title attribute to tooltip doesn't work - it looks like it hides the tooltip under the next cell (changing the coordination of the tooltip to something within the range of the cell, made it partially visible).
(I am new so I cant post images, https://github.com/angular-ui/ng-grid/issues/800 )
Any idea whats wrong?
Thank you.

Drupal How to get a view to display as columns rather than rows

I am trying to get a drupal 6 view to display in a column format rather than rows. Basically I want to group my pictures/video by taxonomy and display them in a table. Similar to what I have below. I tried enabling grouping with a grid layout but that did not seem to do it.
Cows Horses Dogs Cats
Picture Picture Picture Picture
Picture Picture Picture Picture
Picture Picture Picture Picture
Picture Picture Picture Picture
Picture Picture Picture Picture
Hope this makes sense.
If you're using Views 2, one way would be to create a table view, then use a custom views-view-your-view-name.tpl.php file to output the columns and rows vertically rather than horizontally. That template override gets the rows and columns as arrays of objects that you can output however you'd like.
I don't think Panels are good answer to this question, the have different purpose.
I would maybe use a view which is sorted by custom parameter in URL, set output as list (so it is li div.title Title, div.date Date, div image Image /li etc), and style the list with css (.li has fixed size and float:left;).
Then I would a "sort by" selector before view (there is a field for HTML that will be repeated before any view output - [a href="?sort=Name"]Sort by name[/a])
You might be able to use multiple views and panels. Check out the panels module
The Flipped Table add-on is part of the Views Hacks module.

Resources