Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Fontmetric/Textwidth to manually calculate wordwra
Message
De
29/09/2009 13:21:50
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01426686
Message ID:
01426694
Vues:
54
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform