Helo,
Following on from a piece of code I found in the forums which shows how to add a button to a text box. I can't seem to figure out how to remove it! - Can anybody help?
Thanks
Following on from a piece of code I found in the forums which shows how to add a button to a text box. I can't seem to figure out how to remove it! - Can anybody help?
Thanks
Public
Sub
AddButton()
Dim
buttonElement
As
New
RadButtonElement(
"..."
)
AddHandler
buttonElement.Click,
AddressOf
buttonElement_Click
Dim
textBoxItem
As
RadTextBoxItem =
Me
.RadTextBox1.TextBoxElement.TextBoxItem
textBoxItem.Alignment = ContentAlignment.MiddleLeft
Me
.RadTextBox1.TextBoxElement.Children.Remove(textBoxItem)
Dim
dockLayoutPanel
As
New
DockLayoutPanel()
dockLayoutPanel.SetDock(textBoxItem, Telerik.WinControls.Layouts.Dock.Left)
dockLayoutPanel.SetDock(buttonElement, Telerik.WinControls.Layouts.Dock.Right)
dockLayoutPanel.Children.Add(buttonElement)
dockLayoutPanel.Children.Add(textBoxItem)
Me
.RadTextBox1.TextBoxElement.Children.Add(dockLayoutPanel)
End
Sub