Re: GtkComboBoxEntry alignment



Hi Matthias,

I should be able to do that but can't because none of those functions you mention actually reset entry_box->priv->text_renderer to my new text renderer. It is still referenced even if you do a clear_layout(), all set_text_column() does is to call gtk_cell_layout_set_attributes() on entry_box->priv->text_renderer after setting the appropriate text_column int. As I said this needs to be done as it is still accessed but the GtkComboBoxEntry widget. I guess the API that is missing is the ability to query the items in a gtk_cell_layout implementer, or is this already possible?

Thanks for your time

Ian

Matthias Clasen wrote:

On Fri, 2004-07-30 at 03:29, Ian King [ES] wrote:
Hi Matthias,

I did try this but there seems to be no way to set the internal field used for text rendering to my new text renderer. This needs to be set otherwise you get error messages printed to the console. I couldn't find a way of using my own cell renderer, it seems to be a limitation that I cannot access directly the one used by GtkComboBoxEntry. Now I could build my own widget from a GtkComboBox but that would defeat the point of having the GtkComboBoxEntry, it seems the API needs a gtk_combo_box_entry_get_text_renderer() to access the private field.

Thanks for your response

Hmm, the api could use a bit of improvement. But you should be able
to get it to work by first doing a set_text_column() (which sets the
private text_column field you mention), then clear_layout() to wipe
out the text renderer, then pack_start() your own cell renderer for rendering the text column...

Matthias

_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]