cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
jan_solo
Level III

How can I build a V List Box dynamically?

Hi everyone,

I need a window, that can be saved as Word document.

At the moment the results are completely useless (as there are a few thousand graphs underneath each other on one page).  I figured out why my page breaks don't work.  The problem here is that I have to build the window dynamically.

What I need to do is:

New Window("MyTitle", // Create a new window

    V List Box( // Stack everything on top of each other

        For (i = 0, i <= N Col(InputTable), i++,

            <Do Stuff>;

            <Create Chart>;

            <Do Stuff>;

            <Create Chart>;

            <Add Page Break Box>;

        );

    );

);

However, the syntax for the V List Box

V List Box(

     <<Element1,

    <<Element2,

    ...

);

This means my code will never work...

I tried to put the for loop outside the V List Box (adding several list box to a window), but then I have no results.  So what I actually need is a way to define a V List Box and a way to add charts and page break boxes to it AFTER it was created and initialized, like this

New Window("MyTitle",

    MyListBox = V List Box();

);

<Do Stuff>;

ch = <Create Chart>;

MyListBox << Add ch;

Is there any way that I can add my charts after List Box Creation?

Or is there any wy I can dynamically add charts to the listbox?

Or is there a way to store all charts in an array?

Thanx!

Jan.

1 ACCEPTED SOLUTION

Accepted Solutions
jan_solo
Level III

Re: How can I build a V List Box dynamically?

InputTable = Open( "$SAMPLE_DATA/Drug.jmp" );


New Window( "MyWindow", tt = V List Box() );


For( i = 2, i <= N Col( InputTable ), i++,

  <Do Stuff>;

  tt << append(

    V List Box(

      Text Box( "Chart " || Char( i - 1 ) ),

      InputTable << oneway( Y( Column( i ) ), X( Column( 1 ) ) )

    )

  )

);



It works!!!

View solution in original post

1 REPLY 1
jan_solo
Level III

Re: How can I build a V List Box dynamically?

InputTable = Open( "$SAMPLE_DATA/Drug.jmp" );


New Window( "MyWindow", tt = V List Box() );


For( i = 2, i <= N Col( InputTable ), i++,

  <Do Stuff>;

  tt << append(

    V List Box(

      Text Box( "Chart " || Char( i - 1 ) ),

      InputTable << oneway( Y( Column( i ) ), X( Column( 1 ) ) )

    )

  )

);



It works!!!