[Gambas-user] Strange way of working about form dimensions

Jose J. Rodriguez joe1962 at ...626...
Fri May 26 10:12:17 CEST 2006


On 5/18/06, Leonardo Miliani <leonardo at ...1237...> wrote:
> On the notebook, I created a form that is 384x257 pixel(X,Y) in
> dimensions but when I open the source code on the desktop PC I find that
> the dimensions are changed in (X, Y). I tried to compile the source but
> when I run the executable on the desktop I find again the altered
> dimensions of the form.
>
> When I opened the .form files I looked at the first lines and they
> appear as:
>
> "
> { frmStart Form
>    MoveScaled(50.6667,28.6667,42.6667,28.5556)
>    'Move(456,258,384,257)
> ....
> "
>
> The real dimensions are in the quoted line. Maybe is this the problem?
> Gambas does scale the dimensions of the forms looking at the desktop
> ratios (the notebook has a 1280x800 display, the desktop has a 1280x1024
> one).
>

The desktop resolution isn't the only problem. I'm practically going
mad here trying to make an app that works in at least the 3 main
resolutions (640x480, 800x600 and 1024x768). First I tried fitting the
window to the desktop, but that caused untold resizing problems,
specially with fonts and buttons. Then i decided to work with a fixed
640x480 size window (size set in startup code, to avoid the same
problem as Leonardo), centered in the display at larger resolutions.
When the resolution is 640x480, I remove the window borders in code.
This seemed to be working more or less, though I did have to implement
scrollbars in the TexLlabels, as the font doesn't fit at the 2 lower
resolutions. Now I just found out that if I use an external monitor
instead of the notebook's LCD (both set at the same resolution, mind
you), fonts and buttons look much larger in the monitor and now a lot
of stuff doesn't fit in the window anymore! I'm guessing it's
something to do with the dpi setting that probably differs between LCD
and monitor, but I don't understand why, as both are set to 1024x768
and even the horizontal size is very similar.

Regards,
Joe1962




More information about the User mailing list