I have a window populated with various labels and container controls.
They have place holders in their text/caption properties for a description
adjustable by user preference.
For example, a ‘Job’ may be a ‘Project’, ‘Event’, ‘Process’, ‘Gig’, etc.
What I’m trying to do is replace the place holder in the various controls when the window opens:
dim i As Integer
for i = 0 to me.ControlCount-1
dim c As control = me.Control(i)
select case c
case isa Label
dim l As Label = Label(c)
l.Text = ReplaceAll(l.Text,"[J]",preferredJobDescription)
// this case never runs:
case isa myCC
dim t As myCC = myCC(c)
t.Caption = ReplaceAll(t.Caption,"[J]",preferredJobDescription)
case isa EmbeddedWindowControl
// IllegalCastException on this line:
dim t As myCC = myCC(c)
t.Caption = ReplaceAll(t.Caption,"[J]",preferredJobDescription)
end select
next i
I’m stumped how to access the property after I find the control.