[SOLVED] Creating UI in runtime
Posted: Tue Oct 04, 2011 9:44 am
Hi all,
I am new to LiveCode, however, not new to programming (C#, microcontroller, webdevelopment...) but the need has arisen to create a tool which can be used on Mac OS X.
A colleague showed me LiveCode and I quite like it so I chose it for this task.
What I want to do:
In the main stack I have a text input field in which a number is entered. After pressing a button a set of controls (1 label, 2 input fields) should be added to the main stack multiplied by the number in the input field (e.g. "6" will result in 6 of these control sets added to the UI).
My questions:
1) Can I model the set of controls first and then use a command to add various instances of this control set to the main stack?
2) Would it be easier just to create a new stack with createStack as this part of the UI will always be created new and doesn't have to be saved? Are there any drawbacks in this method?
I have done research on creating the UI on the runtime but I couldn't find useful stuff. Maybe I used the wrong terminology or I'm completely on the wrong way of tackling the problem, please let me know.
Thanks in advance for help & advices,
Mero
I am new to LiveCode, however, not new to programming (C#, microcontroller, webdevelopment...) but the need has arisen to create a tool which can be used on Mac OS X.
A colleague showed me LiveCode and I quite like it so I chose it for this task.
What I want to do:
In the main stack I have a text input field in which a number is entered. After pressing a button a set of controls (1 label, 2 input fields) should be added to the main stack multiplied by the number in the input field (e.g. "6" will result in 6 of these control sets added to the UI).
My questions:
1) Can I model the set of controls first and then use a command to add various instances of this control set to the main stack?
2) Would it be easier just to create a new stack with createStack as this part of the UI will always be created new and doesn't have to be saved? Are there any drawbacks in this method?
I have done research on creating the UI on the runtime but I couldn't find useful stuff. Maybe I used the wrong terminology or I'm completely on the wrong way of tackling the problem, please let me know.
Thanks in advance for help & advices,
Mero