EventBox problem
- From: Stefan Jeske <jeske braunschweig netsurf de>
- To: gtk-list redhat com
- Subject: EventBox problem
- Date: Wed, 29 Oct 1997 17:01:33 +0100 (MET)
Hi !
I'd like to create a multi-column listbox with each list item containing
several left- or right-justified labels (all of them in a big hbox).
I need clipping, so I guess that EventBoxes have to be used. (?)
But if I put each label into an EventBox, the whole list looks quite ugly
because the background of all EventBoxes (or labels ?) is painted grey...
How can I change the color, or is there a much better (and especially
faster) way to create multi-column clipping listboxes (with fewer X
windows) ? There will be a few hundred items in the list, and it's
already quite slow... :-|
This is my code to create the list items :
li = gtk_list_item_new ();
hbox = gtk_hbox_new (FALSE, 0);
event_box = gtk_event_box_new ();
label = gtk_label_new (some_string);
gtk_label_set_justify (GTK_LABEL(label), GTK_JUSTIFY_LEFT);
gtk_widget_set_usize (label, some_length, 0);
gtk_container_add (GTK_CONTAINER(event_box), label);
gtk_box_pack_start (GTK_BOX (hbox), event_box, FALSE, FALSE, 2);
gtk_widget_show (label);
gtk_widget_show (event_box);
gtk_container_add (GTK_CONTAINER (li), hbox);
gtk_widget_show (hbox);
gtk_container_add (GTK_CONTAINER (list), li);
gtk_widget_show (li);
Ciao,
Stefan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]