a93295c771
- Correzione sull'estensione del TextBox Note in UpdateLicence/Key. Cliccandoci sopra ora si adatta alla lunghezza della stringa contenuta
28 lines
1.1 KiB
VB.net
28 lines
1.1 KiB
VB.net
Class UpdateKeyPageV
|
|
|
|
Dim numberOfLines As Integer = 1
|
|
Dim originalTextBoxHeight As Double = 22
|
|
|
|
Private Sub textBoxNote_TextChanged(sender As Object, e As TextChangedEventArgs) Handles textBoxNote.TextChanged
|
|
If (numberOfLines = 1) Then
|
|
textBoxNote.Height = originalTextBoxHeight
|
|
End If
|
|
If (textBoxNote.LineCount > 0) Then
|
|
If (numberOfLines < textBoxNote.LineCount) Then
|
|
textBoxNote.Height = originalTextBoxHeight * textBoxNote.LineCount
|
|
numberOfLines = textBoxNote.LineCount
|
|
End If
|
|
If (numberOfLines > textBoxNote.LineCount) Then
|
|
textBoxNote.Height = textBoxNote.Height - (originalTextBoxHeight * (numberOfLines - textBoxNote.LineCount))
|
|
numberOfLines = textBoxNote.LineCount
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub textBoxNote_GotFocus(sender As Object, e As RoutedEventArgs) Handles textBoxNote.GotFocus
|
|
Dim ev As TextChangedEventArgs = Nothing
|
|
textBoxNote_TextChanged(sender, ev)
|
|
End Sub
|
|
|
|
End Class
|