Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String too long error
Message
 
À
30/01/2006 10:48:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01091468
Message ID:
01091773
Vues:
20
Hi,

>i need to show about 10 lines of a description, total character length is about 500 characters, i have put it in got focus event of a textbox in a grid using wait wind nowait.

Instead of using WAIT WINDOW NOWAIT, what about displaying a form with AlwaysOnTop = .T. and no title bar. You can achieve this with code like this. In the Init event of the form put
Local loForm as Form
loForm = CreateObject("Form")
loForm.BorderStyle = 1
loForm.AlwaysOnTop = .T.
loForm.TitleBar = 0
loForm.Enabled = .F.
loForm.AllowOutput = .T.
loForm.Move( -1000,-1000 )
loForm.AddObject("edt","Editbox")
loForm.edt.Move( 0, 0, loForm.Width, loForm.Height )
loform.edt.BorderStyle = 0
loForm.edt.Scrollbars = 0
loForm.edt.Visible = .T.
loForm.Show()
This.AddProperty("oInfo",m.loForm)
The code displays the form right away, but outside the visible area. Otherwise you would need to call Show from the GotFocus, which would move the focus away from the current form. In the Unload event put
Thisform.oInfo = NULL
In the GotFocus event of each textbox put this code. Change the Assignment of Value to hold your actual text. Remember that string literals are limited to 254 characters. For long strings you have to use "..."+"....".
Thisform.oInfo.edt.Value = Replicate("A lot of text ",100)
Thisform.oInfo.Move( _Screen.width-153, 1, 150, 150 )
Finally, put this in the LostFocus event of the textbox:
Thisform.oInfo.Move(-1000,-1000)
--
Christof
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform