[Gambas-user] Weird display bug

Benoit Minisini gambas at ...1...
Sat Jun 5 21:31:31 CEST 2004


On Thursday 03 June 2004 00:55, Grahame White wrote:
> In the project I've attached I'm getting a very odd bug.
>
> First off try this first to see if you get the same problem :
>
> 1) Load the project in gambas.
> 2) Run the program.
> 3) Goto help->rules
> 4) Click 'next'.
> 5) Click 'next' again.
>
> If you get the same problem then the bottom of the window should cut off
> some of the buttons.
>
> If you DO get the same bug then end the program and go back to design mode.
> Go into FRules.class and change line 89 from :
>
> FRules.Height = 8 + lblHeading.Height + 8 + pnlRule3.Height + 8 +
> cmdCancel.height + 8
>
> to :
>
> FRules.Height = 8 + lblHeading.Height + 8 + pnlRule3.Height + 8 +
> cmdCancel.height + 7
>
> Follow the above steps again and the window should now be long enough to
> fully enclose the buttons with space to spare.
>
>
> Grahame

I don't have your problem in my KDE 3.2 box.

BUT BE CAREFUL!

Form.Width and Form.Height include the window decorations. The size of window 
decorations is guessed by Qt, because there is no way to get them on X11.

You must always include the size of the decorations when computing a form 
size, by using Form.Width - Form.ClientW and Form.Height - Form.ClientH

Form.ClientW returns the width on the window client area. Form.ClientH its 
height.

So you must write:

FRules.Height = 8 + lblHeading.Height + 8 + pnlRule3.Height + 8 + 
cmdCancel.height + FRules.Height - FRules.ClientH.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list