PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD19] Best Approach to Dynamically Add Controls?
[WD19] Best Approach to Dynamically Add Controls?
Iniciado por guest, 12,mar. 2015 15:16 - 3 respuestas
Publicado el 12,marzo 2015 - 15:16
For my purpose I want to loop through a file and display the count. I thought I might need indirection, but I can't make much sense of that.


Category 1 : Count 50
Category 2 : Count 28
Category N: Count X
Publicado el 12,marzo 2015 - 15:45
Hi Curtis

to dynamically add controls, use controlclone or controlcreate
to use them afterwards, use the indirection system

Anywhere where you would do:
MyControl=Value
do instead
MyControlName is string=You put your control name here
{MyControlname,indcontrol}=Value

And you can have an array with your controls name, or a name that is simply BaseName+Number, etc

Best regards
Publicado el 12,marzo 2015 - 15:46
Curtis,

Are you sure you mean "Add Controls" or are you just wanting add text to a text Control as you loop through?
Publicado el 12,marzo 2015 - 15:54
Thanks Fabrice. And thanks Darren, that might actually be better for my purposes.