VB : 'System.Windows.Forms.Panel' cannot be indexed because it has no default property
Posted on 2009-04-15
When Im trying to add something to a runtime created panel I get this error :
'System.Windows.Forms.Panel' cannot be indexed because it has no default property
This only happens if I try to add something outside of the ROUTINE it was created.
I declare the panel in a routine : Dim days_panel As New List(Of Panel)
Im assuming because its declared in a routine other routines cant see it?
But if I Declare it in the global variables I get the same error occurs for any reference of the panel..
Do I need to declare the default property? Cant seem to find out how!
Thanks for your time.