This question is locked. New answers and comments are not allowed.
I using the code in the tabstrip tutorial to put a close "x" button on tabs and it works but is
there any way to actually destroy the tabs instead of hiding or collapsing them?
This is the code from the tutorial...
there any way to actually destroy the tabs instead of hiding or collapsing them?
This is the code from the tutorial...
Private Function newButton() As RadButtonElement |
Dim radB As New RadButtonElement() |
radB.MaxSize = New Size(12, 12) |
AddHandler radB.Click, AddressOf HideTab |
radB.Font = New System.Drawing.Font("Verdana", 6, FontStyle.Regular, GraphicsUnit.Point, (DirectCast(0, Byte))) |
radB.Text = "x" |
radB.TextAlignment = ContentAlignment.MiddleRight |
'Alignment defines where the button will be placed on the tab |
radB.Alignment = ContentAlignment.TopRight |
Return radB |
End Function |
Private Sub HideTab(ByVal sender As Object, ByVal e As EventArgs) |
Dim buttonElement As RadElement = (DirectCast(sender, RadElement)) |
buttonElement.Parent.Visibility = ElementVisibility.Collapsed |
End Sub |