Op Dinsdag 2007-12-18 skryf A.T.Hofkamp:
> Lennon Cook wrote:
> > "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote:
> >> For a fixed font, take any character, query its width and height,
> > How would I do this?
>
> For text in 'self.name', I do
>
> pango_layout.set_text(self.name)
> xle
Lennon Cook wrote:
"A.T.Hofkamp" <[EMAIL PROTECTED]> wrote:
For a fixed font, take any character, query its width and height,
How would I do this?
For text in 'self.name', I do
pango_layout.set_text(self.name)
xlen_text, ylen_text = pango_layout.get_pixel_size()
and that see
"A.T.Hofkamp" <[EMAIL PROTECTED]> wrote:
> Lennon Cook wrote:
> > Is there a way to set the dimensions of a TextView in units of
> > characters wide, and lines high?
>
> Eh, what is the 'unit of characters wide' with a proportional font?
Whatever it happens to be with a gtk.Entry, which has a
'set
Lennon Cook wrote:
Is there a way to set the dimensions of a TextView in units of
characters wide, and lines high?
Eh, what is the 'unit of characters wide' with a proportional font?
For a fixed font, take any character, query its width and height, and multiply
by the desired number of lines
Is there a way to set the dimensions of a TextView in units of
characters wide, and lines high?
--
Lennon Victor Cook
"He who receives an idea from me receives without lessening, as he who
lights his candle at mine receives light without darkening" -- Thomas
Jefferson
signature.asc
Description: