1. Derek or Chris: Height of ListBox differs from createEx statement

If I create a window and have a ListBox in it and specify the height to be, for
example, 100 pixels, it is actually created by Win32lib somewhat smaller. Why? Is
the amount the height I specify reduced by always the same amount?

judith

new topic     » topic index » view message » categorize

2. Re: Derek or Chris: Height of ListBox differs from createEx statement

Judith Evans wrote:
> 
> If I create a window and have a ListBox in it and specify the height to be,
> for example, 100 pixels, it is actually created by Win32lib somewhat smaller.
> Why? Is the amount the height I specify reduced by always the same amount?
> 

By default, Windows creates listboxes in integral sizes based on the font size.
In other words, is adjusts the size so it shows an exact number of lines rather
than allowing partial lines to be displayed.

There is a create flag that allows this behaviour to be overridden  -
"LBS_NOINTEGRALHEIGHT"


-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

new topic     » goto parent     » topic index » view message » categorize

3. Re: Derek or Chris: Height of ListBox differs from createEx statement

Derek Parnell wrote:
> 
> Judith Evans wrote:
> > 
> > If I create a window and have a ListBox in it and specify the height to be,
> > for example, 100 pixels, it is actually created by Win32lib somewhat
> > smaller.
> > Why? Is the amount the height I specify reduced by always the same amount?
> > 
> 
> By default, Windows creates listboxes in integral sizes based on the font
> size.
> In other words, is adjusts the size so it shows an exact number of lines
> rather
> than allowing partial lines to be displayed.
> 
> There is a create flag that allows this behaviour to be overridden  -
> "LBS_NOINTEGRALHEIGHT"
> 
> 
> -- 
> Derek Parnell
> Melbourne, Australia
> Skype name: derek.j.parnell

Thanks Derek. I think this came up before and I forgot about the style flag.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu