Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9091

Re: How to make StaticText multiline??

$
0
0

Hi Bikram,

 

I don't know the settings too..

 

Try doing it programmatically, by adding new line after a certain character length reached. in Vb.net I used vbcrlf

 

lets say I have "this is a sample static text" see codes below.

 

        Dim strText As String = "this is a sample static text"

        Dim finalText As String = ""

 

 

        Dim maxLen As Integer = 20

        Dim cntLen As Integer = 0

        For s = 1 To Len(strText)

 

 

            finalText = finalText & Mid(strText, s, 1)

            If cntLen >= maxLen Then

                If Mid(strText, s, 1) = " " Then

                    cntLen = 0

                    finalText = finalText & vbCrLf

                End If

               

            End If

 

 

            cntLen = cntLen + 1

        Next

 

 

        Label1.Text = finalText

 

Good luck


Viewing all articles
Browse latest Browse all 9091

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>