Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: mohammed qasem
  Where is mohammed qasem?
 amman
 Jordan
 mohammed qasem
 To: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 Tags
Subject: RE: EMPTY TEXT
Thread ID: 209409 Message ID: 209421 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Sunday, December 28, 2008 2:15:44 PM         
   


i try it at text Init, it works

IF EMPTY(Thisform.text2.value)
This.Value = ''
ELSE
This.Value = TRANSFORM(Thisform.text2.value)
ENDIF
***
at valid
Thisform.text2.value = INT(VAL(This.Value))

> > not work,
> >
> > i see the textbox.value=0&&
> >
>
> Works for me. Quoted from Help on "Format Property":
> >>
> Z
> Displays the value as blank if it is 0, except when the control has focus.
> >>
>
> If your goal is to hide the zero even even when the textbox has the focus, you may need to do more complicated coding:
> you can for instance have an empty textbox.ControlSource property and in textbox.Refresh() do something like
>
> IF EMPTY(Thisform.nValue)
> 	This.Value = ''
> ELSE
> 	This.Value = TRANSFORM(Thisform.nValue)
> ENDIF
> 

>
> and in textbox.Valid()
>
> Thisform.nValue = INT(VAL(This.Value))
> 

>
>
> -Stefan

ENTIRE THREAD

EMPTY TEXT Posted by mohammed qasem @ 12/28/2008 1:39:47 PM
RE: EMPTY TEXT Posted by Stefan Wuebbe @ 12/28/2008 1:40:56 PM
RE: EMPTY TEXT Posted by mohammed qasem @ 12/28/2008 1:46:11 PM
RE: EMPTY TEXT Posted by Stefan Wuebbe @ 12/28/2008 2:01:59 PM
RE: EMPTY TEXT Posted by mohammed qasem @ 12/28/2008 2:15:44 PM
RE: EMPTY TEXT Posted by Stefan Wuebbe @ 12/28/2008 3:38:37 PM
RE: EMPTY TEXT Posted by tushar @ 12/29/2008 7:29:55 AM