or
I am using telerik controls for windows application.
Private Sub grdOPdaten2_EditorRequired(ByVal sender As Object, ByVal e As EditorRequiredEventArgs) Handles grdOPdaten2.EditorRequired |
If e.EditorType Is GetType(RadTextBoxEditor) Then |
e.EditorType = GetType(MyTextBoxEditor) |
End If |
End Sub |
Public Class MyTextBoxEditor |
Inherits BaseGridEditor |
Public Overrides Property Value() As Object |
Get |
Dim editorElement As MyTextBoxEditorElement = DirectCast(Me.EditorElement, MyTextBoxEditorElement) |
Return editorElement.HostedControl.Text |
End Get |
Set(ByVal value As Object) |
Dim editorElement As MyTextBoxEditorElement = DirectCast(Me.EditorElement, MyTextBoxEditorElement) |
If value Is Nothing OrElse value Is DBNull.Value Then |
editorElement.HostedControl.Text = String.Empty |
Else |
editorElement.HostedControl.Text = value.ToString() |
End If |
End Set |
End Property |
Public Overrides Sub BeginEdit() |
MyBase.BeginEdit() |
Dim editorElement As MyTextBoxEditorElement = DirectCast(Me.EditorElement, MyTextBoxEditorElement) |
editorElement.HostedControl.BackColor = Color.White |
End Sub |
Protected Overrides Function CreateEditorElement() As RadElement |
Return New MyTextBoxEditorElement() |
End Function |
End Class |
Public Class MyTextBoxEditorElement |
Inherits RadHostItem |
Public Sub New() |
MyBase.New(New TextBox()) |
Me.StretchHorizontally = True |
Me.StretchVertically = True |
DirectCast(Me.HostedControl, TextBox).AcceptsReturn = True |
DirectCast(Me.HostedControl, TextBox).AcceptsTab = True |
DirectCast(Me.HostedControl, TextBox).Multiline = True |
AddHandler DirectCast(Me.HostedControl, TextBox).KeyDown, AddressOf MyTextBoxEditorElement_KeyDown |
End Sub |
Private Sub MyTextBoxEditorElement_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) |
If e.KeyCode = Keys.Escape OrElse _ |
(e.KeyCode = Keys.Enter AndAlso e.Modifiers = Keys.Shift) OrElse _ |
e.KeyCode = Keys.Tab Then |
Dim grid As RadGridView = DirectCast(Me.ElementTree.Control, RadGridView) |
grid.GridBehavior.ProcessKeyDown(New KeyEventArgs(e.KeyCode)) |
End If |
End Sub |
End Class |
Dim htmlView As New HtmlViewDefinition |
With htmlView.RowTemplate |
.Rows.Add(New RowDefinition) |
.Rows(0).Cells.Add(New CellDefinition("cmbIcpmppCode")) |
.Rows(0).Cells.Add(New CellDefinition("dtDatum")) |
.Rows(0).Cells.Add(New CellDefinition("cmbLocal")) |
.Rows(0).Cells.Add(New CellDefinition("txtZusatz")) |
.Rows(0).Cells.Add(New CellDefinition("chkHauptleistung")) |
.Rows(0).Cells.Add(New CellDefinition("grdCmdDelete")) |
.Rows(0).Cells(1).RowSpan = 2 |
.Rows(0).Cells(2).RowSpan = 2 |
.Rows(0).Cells(3).RowSpan = 2 |
.Rows(0).Cells(4).RowSpan = 2 |
.Rows(0).Cells(5).RowSpan = 2 |
.Rows.Add(New RowDefinition) |
.Rows(1).Cells.Add(New CellDefinition("cmbArzt")) |
End With |
grdOPdaten2.ViewDefinition = htmlView |
Hi,
I added a tab strip with two tab items on the left side. Furthermore I changed the TextOriantation to vertical so that the text appears horizontal on screen. At the end I attached an Image to both tab items. After compiling the application the height of the tab strip changes, both tab items looses their ImagePrimitive settings and the second tab item looses the attached image.
Regards
Martin