|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
rich text maximum number of lineshi....
Can anyone tell me plz how to set a maximum number of (lines) to a rich text control and show only last linse when number of lines exceeds the maximum number??? i've tried to use richtext.lines array to determine lines length but i can remove from it cause its of system array type and is length fixed which means i cant add or remove elements from it... thx in advance Hello, Art,
Are you trying to do something like this? Private mstraLines As String() = {"First Line"} Private Sub Button1_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles Button1.Click Const kinMaxLines = 4 Dim intTotalLineCount As Integer = UBound(mstraLines) + 1 ReDim Preserve mstraLines(intTotalLineCount) mstraLines(intTotalLineCount) = "This is new line # " & _ intTotalLineCount intTotalLineCount = intTotalLineCount + 1 Dim intLinesToShow As Integer = intTotalLineCount If (intLinesToShow > kinMaxLines) Then intLinesToShow = kinMaxLines End If Dim intFirstLine As Integer = intTotalLineCount - intLinesToShow Dim straLinesToShow(intLinesToShow - 1) As String Array.Copy(mstraLines, intFirstLine, _ straLinesToShow, 0, intLinesToShow) RichTextBox1.Lines = straLinesToShow End Sub Cheers, Randy ArtOfSpe***@gmail.com wrote: Show quoteHide quote > hi.... > Can anyone tell me plz how to set a maximum number of (lines) to a > rich text control and show only last linse when number of lines exceeds > > the maximum number??? > > i've tried to use richtext.lines array to determine lines length but i > can remove from it cause its of system array type and is length fixed > which means i cant add or remove elements from it... > > > thx in advance >
How to retrive Outlook 2003 style gradient color schemes?
Dynamic DataGridView missing horizontal scrollbar Accessing Properties within a Panel Inheritance Printing the contents of a textbox Copy List(Of type) to another List(Of type) Reading a Webpage Source with Cyrillic Characters Serialization of Object Graph (Inheriting ArrayList) Get the Application Icon?? get selected node from mouse right click |
|||||||||||||||||||||||