Re: [Java-gnome-developer] Creating custom widgets
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2008-03-01 11:40:29
|
On Sat, 2008-03-01 at 01:01 +0300, Alexey Titov wrote: > > What are you trying to achieve? In my experience, there is little you > > cannot do with CellRendererText and CellRendererPixbuf. > Can I display combobox with images in the cell? Yes. You [can] pack (one or more) CellRenderers into ComboBoxes the same way you pack (one or more of) them into a TreeViewColumn. > Or html text (like JLable)? Well, I have no idea what JLabel does or doesn't do, but in GTK you use Pango markup to add emphasis to what would otherwise be ordinary text in a Label or a CellRendererText. See http://library.gnome.org/devel/pango/stable/PangoMarkupFormat.html or http://www.pygtk.org/pygtk2reference/pango-markup-language.html and use http://java-gnome.sourceforge.net/4.0/doc/api/org/gnome/gtk/Label.html#setUseMarkup(boolean) or http://java-gnome.sourceforge.net/4.0/doc/api/org/gnome/gtk/CellRendererText.html#setMarkup(org.gnome.gtk.DataColumnString) as appropriate. AfC Sydney |