Controls?
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts
Page 1 of 1
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
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Send me your stuff I'll have a nosey 

Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Your code is a little fiddly but if I understand you correctly you can do it like this:
First open SkinDate.vb and make these public:
First open SkinDate.vb and make these public:
Code: Select all
Then in your form3 change your handle code to this:Public l1 As New SkinDateAdding
Public l2 As New SkinDateAdding
Public l3 As New SkinDateAdding
Code: Select all
You would access them directly by their names l1, l2 and l3 ect Protected Overrides Sub CreateHandle()
MyBase.CreateHandle()
TabStop = False
'l1.Dock = DockStyle.Top
'' l1.Description = Description
''l1.EventColor = eventcolor
'l2.Dock = DockStyle.Top
'l3.Dock = DockStyle.Top
For Each itm As Control In EnumerateAllControls(Me)
For Each c As Control In itm.Controls
'ct.Location = New Point(0, 21)
'Controls.Add(ct)
If TypeOf c Is SkinDate Then
DirectCast(c, SkinDate).l1.Description = "Test1"
DirectCast(c, SkinDate).l2.Description = "Test2"
DirectCast(c, SkinDate).l3.Description = "Test3"
End If
Next
Next
End Sub
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Ah... silly me lol
Thanks again dear friend
Thanks again dear friend
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023