I have added a control to a workspace with below code
Dim w As KryptonDockingWorkspace = kryptonDockingManager.ManageWorkspace(KryptonDockableWorkspace)
kryptonDockingManager.ManageControl(KryptonPanel1, w)
KryptonDockingManager.ManageFloating(Me)
KryptonDockingManager.AddToWorkspace("Workspace", New KryptonPage() {NewDocument()})
Private Function NewDocument() As KryptonPage
Dim page As KryptonPage = New KryptonPage()
page.Text = "MainModule"
page.TextTitle = "MainModule"
page.TextDescription = "MainModule"
page.Name = "Project1Page1"
page.UniqueName = "CodePage"
'// Document pages cannot be docked or auto hidden
page.ClearFlags(KryptonPageFlags.DockingAllowAutoHidden)
page.ClearFlags(KryptonPageFlags.DockingAllowDocked)
Dim tmpSyntax As SyntaxBoxControl = New SyntaxBoxControl
tmpSyntax.Dock = DockStyle.Fill
page.Padding = New Padding(0)
page.Controls.Add(tmpSyntax)
Return page
End Function
I now need to go back and add and edit text in the tmpSyntax text box that I added, but I am having trouble finding reference to the control to be able to do this. Have tried a few things like this
Dim ctl As Control = Me.GetNextControl(Me, True)
Do Until ctl Is Nothing
If TypeOf ctl Is SyntaxBoxControl Then
ctl.Text = "found it"
End If
'Do something
ctl = Me.GetNextControl(ctl, True)
Loop
but it does not find the control. Please help...
David