Problem CustomTextField.Parent Cast to ContainerControl

Hello, I have created a CustomTextField.
The text fields are placed on a ContainerControl.

Now I have to cast the ContainerControl via the parent of the Texfield.
There are variables stored in the ContainerControl that I need access to.

However, I can’t find any option here. I couldn’t find anything in the forum either.

Type mismatch error. Expected class ContainerControl, but got class RectControl
var base as ContainerControl = r

var r as RectControl = me.Parent
var V_CC as ContainerControl = r

var V_B as V_Base = V_CC

me.Tooltip = V_B.VersuchParent.VN.totext

Casting is done with parenthesis

Dim c1 as class1
Dim p1 as ParentClass = c1

 If p1 isa Class1 then
   // cast p1 to Class1
   Class1(p1).whateverIsSpecificToClass1
End if

Thanks for your help, I found something in the forum that works for me:

var ewc as EmbeddedWindowControl = EmbeddedWindowControl(me.Parent)
var c as ContainerControl1 = ContainerControl1(ewc.Container())

me.Tooltip = c.wert.totext


------------------------------------------------------------------------

Protected Module EmbeddedWindowControlExtensions
		Function Container(extends ctrl as EmbeddedWindowControl) As ContainerControl
		  Dim handleToFind As Integer = ctrl.Handle
		  
		  If handleToFind = 0 Then
		    Return Nil
		  End If
		  
		  // ok we have the handle for this EWC 
		  // so find the matching ContainerControl
		  
		  Dim iter As Runtime.ObjectIterator = Runtime.IterateObjects
		  While iter.MoveNext
		    If iter.Current IsA ContainerControl Then
		      Dim tInfo As Introspection.TypeInfo = Introspection.GetType(iter.Current)
		      Dim pInfo() As Introspection.PropertyInfo = tInfo.GetProperties
		      For Each propInfo As Introspection.PropertyInfo In pInfo
		        If propInfo.Name = "handle" And propInfo.Value(iter.Current) = handleToFind Then
		          Return ContainerControl(iter.Current)
		        End If
		      Next
		      
		    End If
		    
		  Wend
		  
		  Return Nil
		  
		End Function

End Module