Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with a zero in text box
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00032989
Message ID:
00033413
Vues:
48
Hello! May be following code will work in this case: ************************************************** *-- Form: myform1 (c:\vfp\form1.scx) *-- ParentClass: myform (c:\projects\framewrk\vfp\libs\myclass.vcx) *-- BaseClass: form * DEFINE CLASS myform1 AS myform Top = 0 Left = 0 Height = 190 Width = 268 DoCreate = .T. Name = "Myform1" custResize.Name = "custResize" ADD OBJECT pageframe1 AS pageframe WITH ; ErasePage = .T., ; PageCount = 2, ; Top = 10, ; Left = 10, ; Width = 241, ; Height = 169, ; Name = "Pageframe1", ; Page1.Caption = "Page1", ; Page1.Name = "Page1", ; Page2.Caption = "Page2", ; Page2.Name = "Page2" ADD OBJECT myform1.pageframe1.page1.text1 AS textbox WITH ; Alignment = 0, ; Value = 0.00, ; Format = "999,999,999.99", ; Height = 23, ; InputMask = "999,999,999.99", ; Left = 34, ; SelectOnEntry = .T., ; Top = 17, ; Width = 185, ; Name = "Text1" ADD OBJECT myform1.pageframe1.page1.text2 AS textbox WITH ; Height = 23, ; Left = 34, ; Top = 62, ; Width = 100, ; Name = "Text2" PROCEDURE text1.Click keyboard '{home}' ENDPROC ENDDEFINE * *-- EndDefine: myform1 ************************************************** It work fine not only when user TABs into txtbox but when he going with Enter. And pay attention that you should press ',' instead '.' to get decimals Have a happy day Vladimir Shevchenko > Vladimir, this will only work if the user TABs into the textbox. If he > uses the mouse, then the cursor is set at the point where the mouse > clicked. VFP assumes that you MEANT to put the cursor at that point, and > that you're happy with where the decimal point is relative to the cursor. > This way it's easy to CHANGE a number, but can have strange effects if > you're entering a NEW number. > > HTH > Barbara
* Human is a question asked by birth and answered by death. Machine is another kind of question with another kind of answer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform