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
Responder
Timm
Mensajes: 136
Registrado: Lun Jun 21, 2010 11:01 am

TEdit

Mensaje por Timm »

Hi!
when I use for example oEdit1:Value := " Test " the trailing blank space character is deleted.
How can I avoid that?
Best regards, Timm.
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9250
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

TEdit

Mensaje por ignacio »

Hello,
Sorry I can not reproduce your error.
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Timm
Mensajes: 136
Registrado: Lun Jun 21, 2010 11:01 am

TEdit

Mensaje por Timm »

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

Attached files Edit.zip (3 KB)Â
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9250
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

TEdit

Mensaje por ignacio »

Hi,
Please see the video.
Regards,

Attached files capture-1.mp4 (109.9 KB)Â
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Timm
Mensajes: 136
Registrado: Lun Jun 21, 2010 11:01 am

TEdit

Mensaje por Timm »

Hi Ignacio,
calling ::oEdit1:Value := " Test " a second time does not solve the problem.
Best regards, Timm.
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9250
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

TEdit

Mensaje por ignacio »

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]
https://www.xailer.com
Timm
Mensajes: 136
Registrado: Lun Jun 21, 2010 11:01 am

TEdit

Mensaje por Timm »

Hi Ignacio,
this is a missunderstanding. Sorry, my fault.
When you set oEdit1:Value := " Test " the control (oEdit1) receives only " Test".
Best regards, Timm.
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9250
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

TEdit

Mensaje por ignacio »

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]
https://www.xailer.com
Responder