LicenceManager 2.1e4 :
- TextBox Note si estende/restringe automaticamente in base al numero di righe scritte al suo interno. Valido per New e Update di Licence e Key.
This commit is contained in:
@@ -1,3 +1,22 @@
|
||||
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
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user