On Feb 25, 2009, at 6:26 AM, Sibylle Koczian wrote:

> I've started to develop my application on Windows and then opened it
> again on Linux. This time I've used the ClassDesigner. On Linux Dabo
> uses a bigger font, which is quite ok by itself, but I've problems to
> adapt all my controls. Most of them I got to a reasonable size by
> checking "sizer_expand" in the Object Info or by setting the  
> proportion
> to 1, then saving, running the application, reopening it in the
> ClassDesigner and then setting expand and proportion properties back  
> to
> their former values.
>
> But there is one button that doesn't respond to this treatment: it
> stubbornly stays bigger than needed after setting proportion to 1 and
> back to 0.
>
> In this case I don't know if I can create a simple example showing the
> behavior. I'd rather ask first: what's the normal and preferred method
> to adapt control sizes to changing font size?

        Dabo scales default fonts a little bigger on OS X, due to the  
difference in rendering on that platform, but handles Gtk and Win the  
same. I don't know why changing the expand settings would affect font  
size like that; it certainly isn't supposed to.

        All controls have fontZoomIn(), fontZoomOut() and fontZoomNormal()  
methods; these are called iteratively on the form when you press Ctrl- 
+, Ctrl-- and Ctrl-/. But they base their 'normal' point on the size  
the font for the control is when it was last set; e.g., if you define  
a control with a font size of 16, fontZoomIn() will change it to 17.

> Another thing: one label should have a background color distinct from
> the rest. Worked quite well on Windows ("Edit BackColor" in the Object
> Info), but on Linux I can choose what color I want, the background  
> stays
> unchanged. Changing the text color works. And if I set a border for  
> that
> label, this border doesn't appear round the label text, but somewhere
> farther down.

        I believe that this is a "feature" of labels on Gtk. They are not  
actual controls, but are drawn on demand. Since Dabo uses wxPython and  
wxPython uses native ui wherever possible, this is not something that  
we can change.

        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.

> Last cosmetic question, this time the same problem on both OS: I've  
> got
> a grid sizer with four buttons in a horizontal row. The captions have
> different length and so the buttons, and the grid sizer columns have
> different width. How can I change that? Sizer_expand and  
> sizer_colExpand
> are checked, sizer_proportion is 1 for the buttons.


        I'm not sure that you can do that with a grid sizer; it determines  
what it thinks the proper width for the buttons should be, and then  
adjusts itself accordingly. You might try adding another row with  
plain panels, and adjust their width to be 1/4 of the total width, and  
then set the buttons to have Expand=False and HAlign="Center". It's a  
bit of a hack, as you'll probably have to deal with setting a  
DynamicWidth property for the panels or hook into the Resize event of  
the form, but it should work.


-- Ed Leafe




_______________________________________________
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