Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Fontmetric/Textwidth to manually calculate wordwra
Message
From
29/09/2009 13:21:50
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01426686
Message ID:
01426694
Views:
55
>Are you sure you mean Textbox and not an EditBox?

Hi, Naomi

In my real situation I am prefering to use ListBox(no EditBox) because ListBox have AutoHideScrollbar porperty that I want to use. EditBox don't have AutoHideScrollbar property.

So I need to insert text string in ListBox and if the text is greater than ListBox.Width, I need to insert into new line.

Something like this:
Local liIndex as Integer, lsText as String
lsText  = "some string text that can be greater than ListBox.Width"
liIndex = 1
Do while liIndex <= Len(lsText)
  myListBox.AddListItem(Substr(lsText, liIndex, myListBox.Width), myListBox.ListCount + 1)
  liIndex = liIndex + myListBox.Width
EndDo
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform