[Gambas-user] MDI Form, Workspace and minimized Windows

Gianluigi gradobag at gradobag.it
Thu Aug 3 16:35:09 CEST 2023


Il 03/08/23 13:11, Demosthenes Koptsis ha scritto:
>
> 1) Well i dont want to detach the form and minimized.
>
> i was thinking the VB MDI which forms minimized and maximized inside 
> Workspace...
>
> ...but as i suppose Gambas3 Workspace does not provide the same usage 
> with VB MDI.
>
>
> 2) Also VB MDI had scrollbars for forms with larger dimensions, Gambas 
> does not.
>
> Gambas Workspace loads forms in maximized state to fill whole 
> workspace, no matter the size of child-form.
>
>
Hi,

Before fully understanding Gambas containers, you need patience.
You can do this test:
In a new graphic project, in addition to the FMain add a new form, Form1.

This is the FMain code:

Public Sub Form_Open()

   Dim hWork As Workspace

   Me.Arrangement = Arrange.Fill

   With hWork = New Workspace(Me)
     .Add(Form1)
   End With
End

This is the code of Form1:

Public Sub Form_Open()

   Dim hScrollView As ScrollView
   Dim hButton As Button

   With Me
     .Arrangement = Arrange.Vertical
     .Text = "Form 1"
   End With
   With hScrollView = New ScrollView(Me)
     .Arrangement = Arrange.Vertical
     .Expand = True
     .ScrollBar = Scroll.Vertical
   End With
   For i As Integer = 1 To 1000
     With hButton = New Button(hScrollView) As "Mybutton"
       .H = 35
       .Text = "Button" & i
     End With
   Next

End

Public Sub Mybutton_ClicK()

   Print Last.Text

End

Regards

Gianluigi



More information about the User mailing list