How do I create text box dynamically

Get help using Construct 2

Post » Fri Jun 20, 2014 6:32 am

hi

i want to create textbox dynamically based on array no.
if i am having array length 15 then 15 textbox should create.

Thank u
B
7
S
1
Posts: 68
Reputation: 561

Post » Fri Jun 20, 2014 6:57 am

What have you tried so far? Can you show a sample?
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Fri Jun 20, 2014 7:06 am

[quote="codah"]What have you tried so far? Can you show a sample?[/quot]

currently i have no capx ready.
i have created array like shown in below image

according to length of array , text box should created dynamically.
if length is 15 then 15 textbox on screen.
You do not have the required permissions to view the files attached to this post.
B
7
S
1
Posts: 68
Reputation: 561

Post » Fri Jun 20, 2014 8:34 am

OK that's probably not relevant here.. So if you just want to "create X number of textboxes for X size of an array" then see below

dynamictextboxes.capx


Of course you could also have some pre-created text boxes and just move them into place, etc.
You do not have the required permissions to view the files attached to this post.
Last edited by codah on Fri Jun 20, 2014 10:03 pm, edited 1 time in total.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Fri Jun 20, 2014 1:10 pm

codah wrote:without a capx, I'll ignore the above.. if you just want to "create X number of textboxes for X size of an array" then see below

dynamictextboxes.capx


Of course you could also have some pre-created text boxes and just move them into place, etc.


hi codah

thank u for capx :P
it helped me a lot
B
7
S
1
Posts: 68
Reputation: 561

Post » Sat Jun 21, 2014 6:03 am

@codah

need more help
now as per your code only one text get displayed for ever textbox.
i am trying to do few update in your code but m not succeeded.
i want different text for each and every text box & their positions should be one after another not in single line.

Thanks
B
7
S
1
Posts: 68
Reputation: 561

Post » Sat Jun 21, 2014 7:03 am

I just gave you one general technique. You need to work out how to display them in the places you need them. Just calculate the X and Y for your requirements. Happy to help out more if you can't get it working. Maybe post another capx that you have tried.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sat Jun 21, 2014 8:10 am

codah wrote:I just gave you one general technique. You need to work out how to display them in the places you need them. Just calculate the X and Y for your requirements. Happy to help out more if you can't get it working. Maybe post another capx that you have tried.


sure
thanks
B
7
S
1
Posts: 68
Reputation: 561


Return to How do I....?

Who is online

Users browsing this forum: georeb, InfiniteRockets, Yahoo [Bot], Zav and 7 guests