QuestionTab control help.

Posts 1–3 of 3 · Page 1 of 1
Tab control help.
hey guys i need some help.

i have a tabcontrol and i have a added a tab.

do you guys know how to make the three dots after the tab if it becomes too long filled with text


example:

see the dots episode 44-M...

it was suppose to be something longer but they trimmed it by adding the (...)
After the tab or the tab item?
See, if the TabControl / TabPage has the property "AllowEllipses". If it has, set it to true. Otherwise you can create a custom function. I created a quick one for you. But you can change it to your needs:

[php]Function FormatText(ByVal originalText As String, ByVal lengthToShow As Integer, Optional ByVal shortenIfgreaterThan As Integer = 15)

If originalText.Length > shortenIfgreaterThan Then

Return originalText.Substring(0, lengthToShow) & "..."
Else
Return originalText
End If

End Function[/php]

Usage:

[php]TabPage1.Text=FormatText("http://www.mpgh.net/forum/33-visual-basic/",19,19)[/php]

Shortens the text only if the text to set to tab is greater than 19 in length.
Hope this helps !!
Posts 1–3 of 3 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?