Re: label justification in button



Melvin Hadasht <melvin hadasht free fr> writes:

Hi,

how can one justify the label of a button ? I tried :

button = gtk_button_new_with("Test");
gtk_label_set_justify(GTK_LABEL(GTK_BIN(button)->child),
GTK_JUSTIFY_LEFT);

but it remains centered. What am I doing wrong ?

Try:
  button = gtk_button_new_with("Test");
  gtk_misc_set_alignment (GTK_MISC (GTK_BIN (button)->child), 0.0, 0.5);

Setting the justify only matters with multiple lines of text.

-Jonathan




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