Re: [Java-gnome-developer] show a ColorButton into a collumn of a TreeView
Brought to you by:
afcowie
|
From: cyber p. <cyb...@gm...> - 2012-02-06 16:20:04
|
You can use DataColumnPixbuf, and a CellRendererPixbuf to display an image (you can create one with ImageIO) filled with the desired color. To store a reference to the color object you can use DataColumnReference<Color>. Just remember that the model of the treeview is meant to be used only for presentation purposes and not to store your application's model. On Mon, Feb 6, 2012 at 3:03 PM, lameire alexis <ale...@ho...> wrote: > Hi, > I understood the way to use the model view of treeview widget but i need > a custom use of this widget. > I would like to store in the model a color, that must be shown in the > treeview. > To make this I need first to create my own CellRenderer, i would like to > know how to do this. > Secondly to store my color into the model i need to know how to make my > own DataColumn and finally, how to use it in the listStore model. > > Thanks for your attention > Alexis Lameire > > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer |