Controls?
Posted: Mon Dec 12, 2016 5:18 pm
Hello,
We have a custom usercontrol call 'SkinDate'
where we add at CreateHandle() in a Panel with our 'SkinDateAdding' controls
'SkinDate info
if we add a new custompanel in our form with the skindateadding control
we like to add our data in those controls
like so in our example
but its not working :(
and no we don't get any errors
just the skindate controls has been added by manually
any ideas please
'Form1 with a custompanel that contains our SkinDate
We have a custom usercontrol call 'SkinDate'
where we add at CreateHandle() in a Panel with our 'SkinDateAdding' controls
'SkinDate info
Code: Select all
now this works fine Dim l1 As New SkinDateAdding
Dim l2 As New SkinDateAdding
Dim l3 As New SkinDateAdding
Dim ct As New Panel
Protected Overrides Sub CreateHandle()
MyBase.CreateHandle()
l1.Dock = DockStyle.Top
l2.Dock = DockStyle.Top
l3.Dock = DockStyle.Top
ct.Location = New Point(0, 21)
Controls.Add(ct)
ct.Controls.Add(l3)
ct.Controls.Add(l2)
ct.Controls.Add(l1)
End Sub
if we add a new custompanel in our form with the skindateadding control
we like to add our data in those controls
like so in our example
but its not working :(
and no we don't get any errors
just the skindate controls has been added by manually
any ideas please
'Form1 with a custompanel that contains our SkinDate
Code: Select all
For Each itm As Control In EnumerateAllControls(Me)
For Each c As Control In itm.Controls
If TypeOf c Is SkinDate Then
CType(c, SkinDateAdding).Description = "Test"
CType(c, SkinDateAdding).Description = "Test2"
CType(c, SkinDateAdding).Description = "test3"
End If
Next
Next