Hi,
i want to use a groupbox to group several labels and textfields. in one of my windows, there is a Behavior-Option in the Inspector, to let me set the InitialParent for all my labels and textfields. There was GroutBox1 inserted automatically.
In my 2nd window, i have also a groupbox with several labels and textfields, but no option InitialParent in the Behavior-Options of these labels and textfields. So i tried to set this by this code in the open-event of my 2nd window:
txtKundenNr.Parent = GroupBox1
txtFirma.Parent = GroupBox1
txtVorname.Parent = GroupBox1
txtNachname.Parent = GroupBox1
txtTelefon.Parent = GroupBox1
txtTelefax.Parent = GroupBox1
txtEmail.Parent = GroupBox1
txtStrasse.Parent = GroupBox1
txtHausnummer.Parent = GroupBox1
txtPostleitzahl.Parent = GroupBox1
txtWohnort.Parent = GroupBox1
txtFunktion.Parent = GroupBox1
This fixed my problem by far, but it seems, that the last 4 textfields were not added completely to the groupbox. there is also no red border around the groupbox, when selecting these 4 textfields. it is, when i select any other of the textfields. when i resize the window, the groupbox resizes perfectly and all of the controls within. But when i disable the groupbox, the last 4 textfields (hausnummer, postleitzahl, wohnort, funktion) are not disabled.
Why i have to do so much coding, when my 1. windows did all this automatically?
What is the right way to add controls to a groupbox?