MartinCroft
Programmer
Hi
Ive added several dynamic controls to a form via a button
which creates for example combox1, textbox1 on click then combobox2 textbox2 happy as can be however I want to add another button which will remove the last set of objects created
Creating as thus
Dim cb As New ComboBox
cb.Name ="ComboBox" & ipos
'// Additional code her
me.panel1.controls.add(cb)
when trying to remove trying in another button
Dim cb As New ComboBox
cb.name ="Combox" & ipos
Me.Panel1.Controls.Remove(cb)
and i get nothing, I did have it semi working at one point in that it was removing controls just not the one i wanted
how to I use the dynamical created crontrols once created
ie. if ive created textbox2 how do i change elements of textbox1 so I can remove the control
Ive added several dynamic controls to a form via a button
which creates for example combox1, textbox1 on click then combobox2 textbox2 happy as can be however I want to add another button which will remove the last set of objects created
Creating as thus
Dim cb As New ComboBox
cb.Name ="ComboBox" & ipos
'// Additional code her
me.panel1.controls.add(cb)
when trying to remove trying in another button
Dim cb As New ComboBox
cb.name ="Combox" & ipos
Me.Panel1.Controls.Remove(cb)
and i get nothing, I did have it semi working at one point in that it was removing controls just not the one i wanted
how to I use the dynamical created crontrols once created
ie. if ive created textbox2 how do i change elements of textbox1 so I can remove the control