Label text justification broken?
- From: andy lysaker kvaerner no (Andrew Walker)
- To: gtk-list redhat com
- Subject: Label text justification broken?
- Date: Fri, 22 Oct 1999 11:41:53 +0200 (MET DST)
Hi,
I've got this piece of code which is intended to place a fixed
label, "File:", at the extreme left, and let the other label
fill the frame/hbox. But I want the second label to be left
justified and it just doesn't seem to be happening. This is with
1.2.5. I'll upgrade to 1.2.6 if that's the solution, but I'm
fighting deadlines here, so I didn't want to spend time on that
unless I had to. Any ideas anyone?
Regards,
-Andy
static GtkWidget *
kd_gs_current_file_create(GtkWidget *window, GS *gs)
{
GtkWidget *currentfile;
GtkWidget *hbox;
GtkWidget *label;
currentfile = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(currentfile), GTK_SHADOW_IN);
hbox = gtk_hbox_new(FALSE, 5);
gtk_container_add(GTK_CONTAINER(currentfile), hbox);
label = gtk_label_new("File:");
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
gtk_widget_show(label);
label = gtk_label_new(gs->kd->ps_file);
gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
gtk_widget_show(label);
gtk_widget_show(hbox);
return (currentfile);
}
--
Andy Walker Kvaerner Oil & Gas a.s.
andy@lysaker.kvaerner.no P.O. Box 222,
Andrew.Walker@kvaerner.com N-1324 Lysaker, Norway
......if the answer isn't violence, neither is your silence......
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]