Questions tagged [cellrenderer]

145 questions
2
votes
2 answers

JTable change cell colors using TableCellRenderer

I am using a JTable in my GUI application as a grid to represent positions for a game. I want the cells of the table that represent a certain position of an object to have a certain color, and on some actions, the object to move (i.e the color cell…
Saher Ahwal
  • 9,015
  • 32
  • 84
  • 152
2
votes
0 answers

GtkCellRendererText - use "ellipsize" together with "wrap-width"

I need to break some generic text into multiple lines using a GtkCellRendererText. If the text exceeds 3 lines, I would like to ellipsize it. So here is my attempt, which does not work so well. ... g_object_set (G_OBJECT (my_text_renderer), …
Alex
  • 1,602
  • 20
  • 33
2
votes
1 answer

Cell Boundary Gtk Treeview Python

I want to have a cell boundary like this: But what Gtk Treeview gives me is this: Is there any way I can achieve this in Gtk3 Python ?
Pawan Sharma
  • 1,842
  • 1
  • 14
  • 18
2
votes
1 answer

Custom TableCellRenderer not working (table row rendering)

I'm trying to render an specific row of my jtable (it should have a different background color and it should have bold characters). I found several questions regarding how to implement a custom TableCellRenderer (here and here) and the tutorial How…
Bob Rivers
  • 5,261
  • 6
  • 47
  • 59
2
votes
4 answers

JTable cell with multiple Component

My task is to implement a JTable which one of it's column has this appearance: it should contain 4 elements: 1. a JCombobox, which controls the enable status of the other two: they are enabled for "manual" state, and locked on certain…
uzil24
  • 156
  • 4
  • 13
2
votes
1 answer

PyGTK: Doubleclick on CellRenderer

In my PyGTK application I currently use 'editable' to make cells editable. But since my cell contents sometimes are really really large I want to ask the user for changes in a new window when he doubleclicks on a cell. But I could not find out how…
Raphael Michel
  • 854
  • 1
  • 9
  • 18
2
votes
2 answers

Java Swing: Set member which is displayed in JListBox

Is there a comparable mechanism to the .NET "set DisplayMember" for the JListBox Swing component? Overriding the toString() method is not sufficient because I also want to be able to change the display member at runtime. I also looked into…
Julian Lettner
  • 3,309
  • 7
  • 32
  • 49
2
votes
5 answers

Swing: TableCellRenderer that uses boldface for some of the cells

Simple question, but I can't seem to find the answer anywhere online. How do you use a custom TableCellRenderer to render some of the table cells in boldface? I know how to use TableCellRenderer to set the background color on a cell-by-cell basis.…
Jason S
  • 184,598
  • 164
  • 608
  • 970
2
votes
1 answer

JTree cell renderer issue

I've got a JTree with icons on some of the nodes within the tree. They appear and work fine but when I select a node with a icon, the renderer does not render the entire node selected but appears to have an offset applied to it, as if it thinks the…
Ocracoke
  • 1,718
  • 3
  • 24
  • 38
2
votes
1 answer

Trying to color specific cell in JTable... getTableCellRendererComponent Overide

So I know this may be a duplicate question, but I've looked through many of the ones already on here and none of them seem to work for me, so I thought I would post my own and hopefully some of the other people having trouble with this will find…
k9b
  • 1,457
  • 4
  • 24
  • 54
2
votes
1 answer

Custom CellRenderer invoked but appears to have no effect

To put it simply: why doesn't the following small example show a light gray background on the third item in the tree control? The code creates a JTree, populates it with three strings (directly passed in to the constructor) and overrides the…
Deckard
  • 305
  • 1
  • 2
  • 9
1
vote
1 answer

How to choose multiple items in a GTK combobox in python

I have a combobox widget in python that I would like to be able to choose multiple items, but I'm starting to think this is not possible. I see that it is possible on using Gtk.TreeView() by setting the mode to multiple. Is there a way to get a…
narnie
  • 1,742
  • 1
  • 18
  • 34
1
vote
1 answer

Changing the icon of particular node in jtree dynamically based on its index

My problem is like this: I have a tree with root and 4 leafnodes. I need to change icon of a particular node (say 2nd leaf node). My algorithm is like this: step 1: Find index of the required node Step2:Change its icon I am done with step 1,but…
svkvvenky
  • 1,122
  • 1
  • 15
  • 21
1
vote
2 answers

Change the color of one or more nodes in Jtree dynamically

I have created Jtree with Root node and 4Subnodes. My problem is like this: I need to change the foreground and background color of a particular node dynamically. How can i do it? Help me with some piece of code. Thank you all in advance...
svkvvenky
  • 1,122
  • 1
  • 15
  • 21
1
vote
1 answer

Why Ag-grid cell renderer is getting re-initialized on horizontal scrolling (on moveable columns)?

While scrolling moveable columns cell renderer is getting re-initialized due to which the value in ag grid are getting reset. I need solution for this as I am not able to save row data as values gets reset on scrolling. agInit(params): void { …
Pooja Das
  • 11
  • 1
1 2
3
9 10