The function I wrote will only work for labels because it calls a function in GTKMisc which is a parent of GTKLabel but not of GTKEntry.
However there is a similar function for a GTKEntry but it controls horizontal positioning only (which is what I think you want) avaible from GTK+ 2.4 on.
- Code: Select all Expand view
gtk_entry_set_alignment ()
void gtk_entry_set_alignment (GtkEntry *entry,
gfloat xalign);
Sets the alignment for the contents of the entry. This controls the horizontal positioning of the contents when the displayed text is shorter than the width of the entry.
entry :
a GtkEntry
xalign :
The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts
Since 2.4
I don't know if you are still pursuing this issue, or for that matter that I have understood exactly what you want, but if you do need some help implementing the above let me know
Regards
xProgrammer