[Gambas-user] Alignment of child form with gb.form.mdi

Benoit Minisini gambas at ...1...
Tue Nov 21 22:51:00 CET 2006


On Tuesday 21 November 2006 07:48, DivTech wrote:
> Hi,
>
> Using 1.9.46a I am just starting to use the mdi workspace. I have a number
> of child forms that are within a mdi workspace.
>
> If I use "Workspace1.Add(FormName)" the form is added expanded to the full
> area of the workspace with the form placed top left in the workspace and
> black area to the right and bottom of the workspace.
> If I use "Workspace1.Add(FormName,True)" the form is added to the workspace
> normal size and resizeable.  Blank space still outside the form to the
> right and bottom in the workspace.
>
> My question then is there a way to align each form in the centre (or
> specific position) of the workspace.
>
> For example if the workspace was 1024 pixels wide and the form was say 640
> pixels wide, maybe something like "Workspace1.Add(FormName,Resizable,X,Y)"
> eg
> "Workspace1.Add(Form1, True, (Workspace1.Width-Form1.Width)/2, 10)" which
> would place the child form at X=192 and Y = 10 for example.
>
> I hope this makes sense, also maybe there is a way to do this already?
>
> Thanks.

The second parameter of Workspace.Add() is deprecated at the moment, and all 
MDI child windows are fullsize. There were some code for MDI child windows 
that acts like Windows ones, but this code was never merged in the component 
nor completely debugged (I don't remembered). That needs a volunteer :-)

Regards,

-- 
Benoit Minisini





More information about the User mailing list