Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 4 Jahren, 7 Monaten
Letzter Beitrag:
vor 4 Jahren, 7 Monaten
Beteiligte Autoren:
JP, Viggo Poulsen

[WD18] - Linking controls to a variable

Startbeitrag von JP am 09.12.2013 10:38

Hi All,

I dont understand something about linking variables to controls;

I have a window with a single edit control. I pass to the window, using open( window_name , parameter1 ), a string variable as a parameter. I have linked the edit control to this parameter which is now a global variable of the window.

First issue - When the window loads the edit control does not show the value of the string I passed to the window and to which I have linked the control. Why?

Second issue - I then enter some text in the edit control and then click a button to see the value of the variable to which the edit control is linked. The variable does not change its value to the entered text. The edit control.value property does return the entered text. Why does the variable not get updated with what has been entered in the edit control?

It seems to me that if I link a control to a variable and then I change the controls contents that this should then be passed into the variable it is linked to. Or is this not the way it works? If not, what is the purpose of linking a control to a variable?

tia

Antworten:

Hi JP

I think you need to use pagetofile and filetopage. Then your links are being used.

Best regards
Viggo Poulsen

von Viggo Poulsen - am 09.12.2013 11:26
Thanks Viggo. I need to use FileToScreen() and ScreenToFile() to do this in WinDev but same principle. Thanks.

von JP - am 09.12.2013 12:23
Hi JP
Sorry, I missed the WD instead of WB :-)
I have worked quite a bit in WB lately so I may take some things for granted.

von Viggo Poulsen - am 09.12.2013 12:35
Yeah, I didnt think of it becuase I knew FileToScreen() etc. were used for fields in a table but did not realize it is used for variables as well. All working as expected now. Thanks.

von JP - am 09.12.2013 13:10
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.