GtkLabel causes unwanted window resizing
- From: Werner Lehmann <wl bwl uni-kiel de>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: GtkLabel causes unwanted window resizing
- Date: Wed, 22 Nov 2000 15:19:52 +0100
Hi,
I have a GtkLabel in GtkHBox in GtkVbox layout:
hbox1 = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, TRUE, 0);
labelPosition = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (hbox1), labelPosition, TRUE, TRUE, 0);
(Only relevant lines shown)
If the text that I set the GtkLabel to becomes too large to fit into
the available room the whole window is resized so that the GtkLabel
has enough room for the new text.
How can I prevent this? This text should just be cut off or, even better,
an ellipsis "..." at the end of the text would indicate that there is
more text which cannot be displayed now.
Must I find out how much space the text would need, compare that to the
current GtkLabel width and shorten the text if appropriate, or is there
a simpler way? Any sample code for that?
Regards,
WL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]