Subscribe Bookmark RSS Feed

Display Problem

frankeberle

Community Trekker

Joined:

Jun 2, 2016

In a script I have a new window open that has this general syntax:

New Window( "Title",

        <<On Close(Do cool stuff ),

        V List Box(

            titlebox = H list Box(),

            cboxlist = H list Box(),

            V List Box(

                H List Box( Button Box( "Select All", selectall ), Button Box( "Clear All", clearall ), ),

                H List Box(

                    Button Box( "Happiness"),

                ),

            )

        )

);

All this works fine.  My problem is that "titlebox" and "cboxlist" populate with selections later in the program and they never line up.  I have tried many different things to get them to line up but nothing has worked well so far.  "titlebox" populates with a list of up to six items, each with varying width.  "cboxlist" populates with up to six check boxes, each with varying length and width based on the users selection.  The two h list boxes will always have the same number of columns but the width of those columns will depend on what was selected.  Is there a simple way to make sure the columns of the two h list boxes are the same width and thus always line up?

1 REPLY
pmroz

Super User

Joined:

Jun 23, 2011

Lineup box to the rescue:

New Window( "Title", << On Close(Do cool stuff ),

    lineup box(ncol(1),

        titlebox = H list Box(),

        cboxlist = H list Box(),

    ),

    lineup box(ncol(2),

        Button Box( "Select All", selectall ), Button Box( "Clear All", clearall ),

        Button Box( "Happiness"),

    ),

);