In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

TEdit

Xailer professional forum in English
Timm
Posts: 93
Joined: Mon Jun 21, 2010 11:01 am

TEdit

Postby Timm » Fri Feb 21, 2014 9:42 am

Hi!
when I use for example oEdit1:Value := " Test " the trailing blank space character is deleted.
How can I avoid that?
Best regards, Timm.
User avatar
ignacio
Site Admin
Posts: 8556
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

TEdit

Postby ignacio » Fri Feb 21, 2014 10:45 am

Hello,
Sorry I can not reproduce your error.
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Timm
Posts: 93
Joined: Mon Jun 21, 2010 11:01 am

TEdit

Postby Timm » Fri Feb 21, 2014 12:05 pm

Hi Ignacio,
please take a look at the attached modified Edits sample.
Best regards, Timm.

Attached files Edit.zip (3 KB)Â
User avatar
ignacio
Site Admin
Posts: 8556
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

TEdit

Postby ignacio » Fri Feb 21, 2014 12:30 pm

Hi,
Please see the video.
Regards,

Attached files capture-1.mp4 (109.9 KB)Â
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Timm
Posts: 93
Joined: Mon Jun 21, 2010 11:01 am

TEdit

Postby Timm » Fri Feb 21, 2014 2:42 pm

Hi Ignacio,
calling ::oEdit1:Value := " Test " a second time does not solve the problem.
Best regards, Timm.
User avatar
ignacio
Site Admin
Posts: 8556
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

TEdit

Postby ignacio » Tue Feb 25, 2014 10:03 am

Hello,
Sorry I thought my video was clear. I justed want to show you that I'm not able to reproduce your error.
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Timm
Posts: 93
Joined: Mon Jun 21, 2010 11:01 am

TEdit

Postby Timm » Tue Feb 25, 2014 1:44 pm

Hi Ignacio,
this is a missunderstanding. Sorry, my fault.
When you set oEdit1:Value := " Test " the control (oEdit1) receives only " Test".
Best regards, Timm.
User avatar
ignacio
Site Admin
Posts: 8556
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

TEdit

Postby ignacio » Wed Feb 26, 2014 11:07 am

Hi Timm,
I'm afraid that problem arise due the need to trim all the spaces on DBF fields. As you surely remember all the character DBF fields values are filled with spaces up to the length of its field. That was a problem when editing those fields. If we take off that trim operation I'm sure many people will protest.
I suggest you overload the TEdit:SetValue method this way:
METHOD SetValue( Value, lWithEvent ) CLASS TEdit
DEFAULT lWithEvent TO .F.
::FValue := ToString( Value, "" )
::FcText := ::FValue
IF ! Empty( ::Handle ) .AND. !( GetWindowText( ::Handle ) == ::FcText )
IF ! lWithEvent
::lStopEvent := .T.
ENDIF
SetWindowText( ::Handle, ::FcText )
ENDIF
RETURN ::FValue

Best regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info

Return to “English”