PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → ..Captionwidth property not working on edit control
..Captionwidth property not working on edit control
Iniciado por guest, 18,ene. 2015 11:20 - 3 respuestas
Publicado el 18,enero 2015 - 11:20
Hi,

I just wanted to adjust the width of the caption of an edit control when resizing the window and tried to use the property ..CaptionWidth => Compilation Error!

Is there any good suggestion of how to prevent the input field of growing larger when resizing a numeric edit control??

Of course, I know the solution: replace the caption of the edit control with a static control and delete the caption of the edit contol. But that's a lot of work ..

Currently, it looks like that:
[attachment 1307 AnchorOfEditControl.png]
Publicado el 19,enero 2015 - 18:49
Note:

..CaptionWidth works quite OK in WinDev version 20

unfortunately, I have to use v19/US right now.
Publicado el 20,enero 2015 - 12:02
Hi Guenter,

This works in WD19 :

No anchoring on the edit field

Global declaration of the window :
------------------------------------------
initialCaptionWidth is int = Real1..CaptionWidth


Resizing event of the window :
--------------------------------------
delta is int = Window4..Width - Window4..InitialWidth

Real1..CaptionWidth = initialCaptionWidth+delta
Real1..Width=Real1..InitialWidth+delta

Regards,
Bart
Publicado el 20,enero 2015 - 13:24
Hi Bart, thank you! Interesting, which version are you using, did you apply a patch?? In my version 19 ..CaptionWidth is not working, in version 20 it works fine.