[Gambas-user] Problems with HSplit

herberth guzman herberthguzman at ...626...
Fri Jun 26 21:24:23 CEST 2015


Salut Benoit

as always for help.

I have a Hsplit on a form
I create 2 buttons
run the form, the buttons look the same size
the problem is
when clean Hsplit (HSplit1.Children.Clean)
and I return to create the buttons inside HSplit
resize buttons.

CODE

Public Sub Form_Open ()

   Button1_Click '("good")

End

Public Sub Button1_Click () '("Here i have the problem")

   Dim i As Integer

   HSplit1.Children.Clear
   'For Each hToggle In HSplit1.Children
     'hToggle.Delete
   'Next

   For i = 1 To 2
     hToggle = New Button (HSplit1)
     hToggle.AutoResize = True
     hToggle.Text = "T" & i
     Picture hToggle.Picture = ["icon:/32/add"]
   Next

End

Question...?

1- How I can cleaning and create buttons with the same dimensions.?
2-Where I have the error.

regards and thanks for the help

attached example adn image of what I explain

Herberth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hsplit.png
Type: image/png
Size: 27455 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20150626/6e7b5a61/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test_HSplit-0.0.1.tar.gz
Type: application/x-gzip
Size: 4199 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20150626/6e7b5a61/attachment.bin>


More information about the User mailing list