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

Re: GtkEntry alignment



> Too bad.  So, like evil girlfriends, I'll try and fake it!  If I wanted to
> take the label and pad it manually with spaces on either side (depending on
> alignment), any suggestions on functions I could use to figure out the
> number of space needed based off the current font and width of the GtkEntry?


Nice clean and modular (I guess idealistic) code sometimes and 
even often takes the same amount of effort as "hacking into a library
and forcing things to work". Although the latter always seems
to be less time consuming.

It might take you the same amount of time and energy
to write yourself a version of GtkEntry (based on the
one we know) that supports alignments. This would also 
help to avoid sluggishness when users interact.
Hell and if you go and write it; someone else
might not have to!

Also; I'm not sure but I think that "getting the width
in pixels of a label" is quite tricky. (I would do it
if I knew how anyway).


Cheers,
		-Tristan


Alex Pavloff wrote:
> 
> Too bad.  So, like evil girlfriends, I'll try and fake it!  If I wanted to
> take the label and pad it manually with spaces on either side (depending on
> alignment), any suggestions on functions I could use to figure out the
> number of space needed based off the current font and width of the GtkEntry?
> 
> Alex Pavloff - apavloff@eason.com
> Eason Technology -- www.eason.com
> 
> 
> > -----Original Message-----
> > From: Owen Taylor [mailto:otaylor@redhat.com]
> > Sent: Thursday, February 27, 2003 9:59 AM
> > To: Alex Pavloff
> > Cc: 'gtk-app-devel-list@gnome.org'
> > Subject: Re: GtkEntry alignment
> >
> >
> > On Wed, 2003-02-26 at 15:30, Alex Pavloff wrote:
> > > How would I go about aligning the text in a GtkEntry like I
> > can with a
> > > GtkLabel and gtk_misc_set_alignment()?
> >
> > Not currently possible, will be added for 2.4:
> >
> >  http://bugzilla.gnome.org/show_bug.cgi?id=59799
> >
> > Regards,
> >                                          Owen
> >
> >
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



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