GrapeCity.Win.CalendarGrid.v10 アセンブリ > GrapeCity.Win.CalendarGrid 名前空間 > CalendarTextBoxCellType クラス : EllipsisString プロパティ |
このプロパティは Ellipsis プロパティと組み合わせて使用します。
'\r'、'\n'、'\t' などの特殊文字を含む文字列を設定した場合、特殊文字は無視されます。
private void Form1_Load(object sender, EventArgs e) { CalendarTextBoxCellType textBoxCell1 = new CalendarTextBoxCellType(); //If the text cannot display completely, one '......' string will be shown at the text's end, hover the cell, the whole text will be shown in tool tip. textBoxCell1.Ellipsis = CalendarGridEllipsisMode.EllipsisEnd; textBoxCell1.EllipsisString = "......"; //Enter the edit mode, the text will be highlight selected. textBoxCell1.HighlightText = true; textBoxCell1.MaxLength = 10; //The value will be casted to lower case. textBoxCell1.CharacterCasing = CharacterCasing.Lower; CalendarTextBoxCellType textBoxCell2 = new CalendarTextBoxCellType(); //Input text in textBoxCell2, it will be treated as password, always display '#'. textBoxCell2.PasswordChar = '#'; textBoxCell2.UseSystemPasswordChar = false; CalendarTemplate template1 = CalendarTemplate.CreateDefaultTemplate(); template1.Content[1, 0].CellType = textBoxCell1; template1.Content[1, 0].Value = "DELETE THIS STRING TO INPUT BY YOURSELF, ONLY 10 CHARACTERS CAN BE INPUT"; template1.Content[2, 0].CellType = textBoxCell2; template1.Content[2, 0].Value = "12345"; gcCalendarGrid1.Template = template1; }
Private Sub Form1_Load(sender As Object, e As EventArgs) Dim textBoxCell1 As New CalendarTextBoxCellType() 'If the text cannot display completely, one '......' string will be shown at the text's end, hover the cell, the whole text will be shown in tool tip. textBoxCell1.Ellipsis = CalendarGridEllipsisMode.EllipsisEnd textBoxCell1.EllipsisString = "......" 'Enter the edit mode, the text will be highlight selected. textBoxCell1.HighlightText = True textBoxCell1.MaxLength = 10 'The value will be casted to lower case. textBoxCell1.CharacterCasing = CharacterCasing.Lower Dim textBoxCell2 As New CalendarTextBoxCellType() 'Input text in textBoxCell2, it will be treated as password, always display '#'. textBoxCell2.PasswordChar = "#"c textBoxCell2.UseSystemPasswordChar = False Dim template1 As CalendarTemplate = CalendarTemplate.CreateDefaultTemplate() template1.Content(1, 0).CellType = textBoxCell1 template1.Content(1, 0).Value = "DELETE THIS STRING TO INPUT BY YOURSELF, ONLY 10 CHARACTERS CAN BE INPUT" template1.Content(2, 0).CellType = textBoxCell2 template1.Content(2, 0).Value = "12345" gcCalendarGrid1.Template = template1 End Sub