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

DivTech linux at ...1581...
Tue Nov 21 07:48:15 CET 2006


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.
-- 
View this message in context: http://www.nabble.com/Alignment-of-child-form-with-gb.form.mdi-tf2677219.html#a7466625
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list