Am Freitag, den 26.06.2015, 13:24 -0600 schrieb herberth guzman: > 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
Salut Herberth, Public Sub Button1_Click() 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.Text = "T" & i hToggle.Picture = Picture["icon:/32/add"] Next hToggle.AutoResize = True End this works for me. But how you want to distinguish your buttons. -- Amicalement Charlie ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user