>If I allocate a string to a variable or a property i.e thisform.myprop = "test" and then try the following :
>
>if thisform.myprop = "test"
> do something
>endif
>
>This always fails. What have to do is :
>
>if alltrim(thisform.myprop) = "test"
> do seomething
>endif
>
>Is there any way I can stop VFP padding these strings out?
>
>Thanks in advance
>
>Pablo
Paul,
Are you sure ? VFP doesn't pad unless told to do. Even if it were padded :
if thisform.myprop = "test"
would return .t. whether set exact ON/OFF.
PS: You could use :
if thisform.myprop == "test" && instead of trim()
With alltrim() you're trimming leading spaces too. Might that be your problem ?
Cetin