Re: GtkEntry right aligned/justified
- From: Olexiy Avramchenko <olexiy irtech cn ua>
- To: Steffen Gutmann <gutmann ieee org>
- Cc: gtk-list gnome org
- Subject: Re: GtkEntry right aligned/justified
- Date: Fri, 20 Feb 2004 11:06:16 +0200
Steffen Gutmann wrote:
Hello,
I saw this question posted at least twice but no answers were given, the
FAQ doesn't mention it, and all my attempts to make a GtkEntry other
then left-aligned failed including gtk_entry_get_layout for getting a
pointer to the PangoLayout and playing around with several settings in
there.
So, is there a way to make a GtkEntry right aligned, like you want to
have it for numbers in a calculator?
Hi,
GtkLabel is derived from GtkMisc. You have to try
gtk_misc_set_alignment() function:
http://developer.gnome.org/doc/API/2.0/gtk/GtkMisc.html#gtk-misc-set-alignment
Default is "0.5", "0.5" alignment - set xalign parameter to "1.0" and
label will be aligned in the way you want. By the way API reference
mention about that, look at:
http://developer.gnome.org/doc/API/2.0/gtk/GtkLabel.html
near the string "Text layout".
Olexiy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]