PDA

View Full Version : Multidimensional Gui inputs



AbstractTech3D
10-16-2012, 05:50 AM
Hello

I've quickly discovered the limitations of LSIDE include inability to copy and paste components, so as to arrange a table of input boxes easily… (say 10x20 cells).

Is there a way to easily generate a table input GUI component from LScript?

Thanks

xchrisx
10-16-2012, 09:15 AM
Actually I have ran into the same issue you have on numerous occasions. That is one reason I learned python, so that I could write a python script that could make as many elements as I want and it would be easily modified assuming I needed to change something. Below is the fastest workflow I have been able to come up with in LS interface designer although I think its more of a hacky approach as a lot of guess work is involved.

108553

AbstractTech3D
10-16-2012, 01:08 PM
Thanks xchrisx.

Yes, I'd had something similar happening. Though still have problems resizing all the cells. I think I'll be learning Python in the not too distant future too.

Blochi
10-28-2012, 10:16 PM
I don't think I ever used the LSIDE editor.

It's very simple to generate a table interface with LScript. You just put the cell definition in a loop. Like this:


@version 2.2
@warnings
@script generic

// global values go here

var c;

generic
{
// perform all processing here

reqbegin("<Requester Title>");
reqsize(600,200);

for(i=1;i<=3;i++)
{
for(k=1;k<=5;k++)
{
c[i][k]=ctlpopup("Popup",1,@"Item 1","Item 2","Item 3"@);
ctlposition(c[i][k],i*150 - 50, k*20 - 10,130);
}
}
return if !reqpost();

// get requester control values here, in a similar loop.
// Or catch them real-time with ctlrefresh() functions

reqend();
}

AbstractTech3D
10-29-2012, 05:28 AM
That is a smart way to do it. Thanks Blochi!