Ed Leafe schrieb:
> On Mar 3, 2009, at 5:11 AM, Sibylle Koczian wrote:
> 
>> Obviously I haven't explained very well. The default font sizes are
>> different in Windows (8) and Linux (10), but as long as I stay in the
>> same OS and don't alter them myself, they don't change. I suppose my
>> general system settings are responsible for the difference in the  
>> first
>> place. But some buttons were just right on Windows, and on Linux they
>> are too small for their captions. Fiddling with the expand settings
>> often helps: with sizer_expand checked or the proportion set to 1 the
>> button is big enough for its caption, and if I change back those
>> settings, the button shrinks not to its old size, but to a new one  
>> which
>> is just right for the bigger font. Only with one button this doesn't
>> work, it always changes back to its former size (right for Windows,  
>> too
>> small for Linux).
> 
> 
>       So basically, if you don't change the font size, then they show up in  
> 8pt. on Windows, and 10pt. on Linux, but if you, say, increase the  
> font size in Linux to 12pt (+2), it shows up in 12pt (+4) on Windows.  
> Is that the essence of the problem?
> 

Not quite. I never touched the font settings at all. The problem is with
the control sizes, they don't always adapt to the varying default font
sizes.

I have experimented a little more: a form with a vertical sizer
containing two buttons and one label. One of the buttons has a short
caption ("Short"), the other a longer one ("Long button caption"). The
label has a border. All controls with proportion 0, sizer_expand not
checked, alignment center.

I created this form in the class designer in Windows. The first button
(short caption) got a width of 75 - the default width, I suppose. The
second one got 75 to start with, which would have been to small for the
caption. When I saved the form the width was set to 114 (automatically,
not by me).

Ran the application in Windows, everything as expected. Wrote another
small script which produces the same form (hand coded this time). Ran as
expected.

Started Linux, copied everything to my home directory, ran the hand
coded application. Everything ok, border around the label text, both
buttons showing complete captions. Ran the application made with the
class designer: Border around the label where it belongs this time.
First button ok, second button only shows part of the caption.

Opened the form in the class designer and looked at the button widths:
first button now width 94, obviously adapted to the new font size.
Second button still at 114, which is now too small.

So it seems to be like this: controls with default size adapt correctly
to a new font size. Probably they simply get the new default size and
this is appropriate. If the default size is too small for the caption
the control expands - and then it keeps its size in another OS, even
with a bigger default font size.

>>>     As far as the border is concerned, you are probably defining the
>>> label with either Expand=True or Proportion > 0. The border is drawn
>>> around the area allotted for that control, not the are for the text.
>> No, the border is completely in the wrong place: all of it is under  
>> the
>> text and not around it.
> 
>       If you resize the window a little bit to force a redraw, does that  
> correct it? Or is it always off?
> 

In the application where I had the problem first, resizing the window
draws several different borders, all of them beneath the label. And if I
start the application a second time the border has disappeared. In the
application I made just to try these things the border behaves correctly.

Thank you,
Sibylle

-- 
Sibylle Koczian


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to