I am using a Gtk::TreeView to create a tree view in gtkmm. It has two columns. The first column has two types of icons in different rows. One icon is used to add an element to the tree and the second is used to delete the element from the tree.
I have accessed the column number of the first column and added tooltip to the icons. However, I need different tooltips for both the icons.
A variable COL_ADD is used to compare the column using:
if (col == _tree.get_column(COL_ADD-1)) {
set_tooltip_text(_("Add selection to set"));
}
where col is Gtk::TreeViewColumn.
Since both the icons belong to same column, so they are getting the same tooltip. How do I differentiate to get the corresponding rows of icons to add different tooltips to them?
I guess that Gtk::TreeView::set_tooltip_cell() is what you need:
https://developer.gnome.org/gtkmm/stable/classGtk_1_1TreeView.html#ae7cc8fde03c481de81fc9d13e34bff98
Related
I have a table, which is listing the name of benefits and it is only 1 column (just name of the benefit).
I'm wondering if there is any native function of BIRT Report Designer to produce rows not only vertically but also populate horizontally to 3-4 columns.
Something like below:
Benefits List
Benefit-1 Benefit-3 Benefit-5
Benefit-2 Benefit-4 Benefit-6
Thanks in advance for any advice.
Ok, I found a solution!
Under the following link there is a Eclipse Community Page Link recommendation about an additional computed column. Even though I don't have any computed column, the recommendation gave me an inspiration. Instead of creating an additional column, I used the rownum that is used generally to bind dataset parameter. For the table row, I created "visibility" condition that checks if the rownum + 1 is divided by 3. Depending on what is the result, it will be hidden or viewed:
Main Grid
It includes a grid with 2 rows and 3 columns. 1 row is merged to view the header. In each column of second row, the same table is placed with the same dataset.
Image Showing Main Structure
Select Table Row
Image Indicating Row Selection
Set the Visibility
Image Showing Details of Visibility Condition
The syntax basically means: "Do not show the row if the division result is not 1".
For the second column, you will need to compare with 2: (row.__rownum + 1) % 3 != 2 and the third column with 0: (row.__rownum + 1) % 3 != 0
Hope it'll be helpful for someone.
An more straightforward approach ist to use a List item instead of a Table item.
In the detail area of the List, create a Grid item of fixed width and height.
Put the content (e.g.) text into the grid's cells.
Important: Set the "display" property of the grid to "inline" instead of the default "block".
This way BIRT will put the grids from left to right until the line is full.
Then it will fill the next line (think of "display: inline" like adding words to a paragraph).
Here's my situation. I have a main grid, where each row expands to show 2 tabs. The first tab has another grid, with dynamically columns. One of the columns needs to display a template with a modified Kendo Menu (in order for it to look like a dropdown).
When the column is rendered in the main grid, it works just fine. However, when I move that column to the sub-grid, I just see the list, without the kendo menu applied to it.
Two workarounds I tried:
http://dojo.telerik.com/OmiBu/3
Visuals:
Good and Bad
I have a view panel displaying a categorized view, all my columns are sortable.
When I click to sort one of the not categorized columns the values in categorized columns are not displayed. this is normal behaviour for a sorted categorized view in IBMNotes client as well.
The problem is that I need the category values to display if the view is sorted (clicked on sort icon) or display another column containing the category values, but only if the view is sorted.
How can I accomplish this?
First option: use more views with different sort setting in columns after category column. Dynamically change the view name. This works as you want, but it has performance impact on server and I don't recommend it.
Second option: use hide when on redundant (flat) column based on sort options. Exact formula depends on your implementation (submit page code).
I need to show/hide some of the slickgrid columns on the click of a button. Is it possible?
For example , I have a slickgrid having 3 columns. On click of a button I want to show three more columns i.e 4,5,6. On clicking the button again these columns should hide and another div should take its place. So basically toggle 3 of the 6 slickgrid columns.
Thanks
SlickGrid doesn't have a concept of showing or hiding columns. It shows whatever columns you specify in the constructor or in a later call to grid.setColumns(). If you want to hide a column, just remove it from the columns array you call grid.setColumns() again.
You can keep the original columns array with all the columns in a separate variable.
I have a grid with multiple columns and I use the first column for a row label. I looked at the example for making the grid editable, but that appears to make the whole grid editable. Is there away to specify a certain column(s) only?
Got it! By not setting the editor property on the column object the column is non-editable.