RE: how to align a label in GtkTable

2002-02-25 Thread Kason Huang

hi:
you could try gtk_label_set_justify(GtkLabel *label,GtkJustification jtype);
typedef enum
{
  GTK_JUSTIFY_LEFT,
  GTK_JUSTIFY_RIGHT,
  GTK_JUSTIFY_CENTER,
  GTK_JUSTIFY_FILL
} GtkJustification;

for example:
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);

-Original Message-
From: Marco Lettere [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 5:31 PM
To: [EMAIL PROTECTED]
Subject: how to align a label in GtkTable



hello,

I always get a label attached in a GtkTable to be centered in its cell.
How do I get it to be left aligned? is it possible using only
gtk_table_*() or gtk_label_*() functions?
thanx,
M.

  _
|  _ \  ___ ___  _ __| |
| | | |/ __/ _ \| '__|  _|
| |_| | (_| (_) | |  | |___
|/ \___\___/|_|  |_|


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



RE: how to align a label in GtkTable

2002-02-25 Thread Marco Lettere

On Mon, 25 Feb 2002, [big5] ¶À¼y Kason Huang wrote:

yes I tried it by it doesn't seem to work in a table cell context.
I do create a table, create a label, set the label justification and
then attach the label.
I don't know if I'm doing something wrong.
Are there some caveats like first set alignment of the
label and then attach it to the table or or viceversa?
M.

 hi:
 you could try gtk_label_set_justify(GtkLabel *label,GtkJustification jtype);
 typedef enum
 {
   GTK_JUSTIFY_LEFT,
   GTK_JUSTIFY_RIGHT,
   GTK_JUSTIFY_CENTER,
   GTK_JUSTIFY_FILL
 } GtkJustification;



 hello,

 I always get a label attached in a GtkTable to be centered in its cell.
 How do I get it to be left aligned? is it possible using only
 gtk_table_*() or gtk_label_*() functions?
 thanx,
 M.

   _
 |  _ \  ___ ___  _ __| |
 | | | |/ __/ _ \| '__|  _|
 | |_| | (_| (_) | |  | |___
 |/ \___\___/|_|  |_|


 ___
 gtk-list mailing list
 [EMAIL PROTECTED]
 http://mail.gnome.org/mailman/listinfo/gtk-list


  _
|  _ \  ___ ___  _ __| |
| | | |/ __/ _ \| '__|  _|
| |_| | (_| (_) | |  | |___
|/ \___\___/|_|  |_|


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: how to align a label in GtkTable

2002-02-25 Thread Steph

I've never managed to get the text justification working in a label either.

But GtkMisc functions set_alignment(x, y) and set_padding(x, y) work just fine ..

- Original Message - 
From: Marco Lettere [EMAIL PROTECTED]
To: ¶À¼y Kason Huang [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, February 25, 2002 9:46 AM
Subject: RE: how to align a label in GtkTable


On Mon, 25 Feb 2002, [big5] ¶À¼y Kason Huang wrote:

yes I tried it by it doesn't seem to work in a table cell context.
I do create a table, create a label, set the label justification and
then attach the label.
I don't know if I'm doing something wrong.
Are there some caveats like first set alignment of the
label and then attach it to the table or or viceversa?
M.

 hi:
 you could try gtk_label_set_justify(GtkLabel *label,GtkJustification jtype);
 typedef enum
 {
   GTK_JUSTIFY_LEFT,
   GTK_JUSTIFY_RIGHT,
   GTK_JUSTIFY_CENTER,
   GTK_JUSTIFY_FILL
 } GtkJustification;



 hello,

 I always get a label attached in a GtkTable to be centered in its cell.
 How do I get it to be left aligned? is it possible using only
 gtk_table_*() or gtk_label_*() functions?
 thanx,
 M.

   _
 |  _ \  ___ ___  _ __| |
 | | | |/ __/ _ \| '__|  _|
 | |_| | (_| (_) | |  | |___
 |/ \___\___/|_|  |_|


 ___
 gtk-list mailing list
 [EMAIL PROTECTED]
 http://mail.gnome.org/mailman/listinfo/gtk-list


  _
|  _ \  ___ ___  _ __| |
| | | |/ __/ _ \| '__|  _|
| |_| | (_| (_) | |  | |___
|/ \___\___/|_|  |_|


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: how to align a label in GtkTable

2002-02-25 Thread Havoc Pennington


¶À¼y Kason Huang [EMAIL PROTECTED] writes:
 hi:
 you could try gtk_label_set_justify(GtkLabel *label,GtkJustification jtype);
 typedef enum
 {
   GTK_JUSTIFY_LEFT,
   GTK_JUSTIFY_RIGHT,
   GTK_JUSTIFY_CENTER,
   GTK_JUSTIFY_FILL
 } GtkJustification;
 
 for example:
 gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
 

This is the wrong function - see the FAQ.

You want gtk_misc_set_alignment()

Havoc
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list