Hi @shasha_2 ,
I'm not 100% sure of what you want to do and how you intend to use the Column Dialog() command, but the script below will do what you want. It also gives you a lot more flexibility in terms of what options you have in your new window, etc. If you want to make the window modal, just add <<Modal here: New Window("Select Columns", <<Modal, -- and then continue on.
Names Default To Here( 1 );
bwidth = 100;
dt = New Table("test",
Add Rows(3),
New Column("Col 1", Continuous),
New Column("Col 2", Continuous),
New Column("Col 3", Continuous)
);
dt << bring window to front;
box_win = New Window( "Select Columns",
H List Box(
Panel Box( "Select Columns", ColListData = Col List Box( dt, All, Grouped, width( bwidth ), nLines( 5 ) ) ),
V List Box(
Panel Box( "Case Selected Columns Into Roles",
Lineup Box( N Col( 2 ), Spacing( 3 ),
Button Box( "BDATE", colLista << Append( ColListData << Get Selected ) ),
ColLista = Col List Box( width( bwidth ), N Lines( 1 ), Max Items( 1 ), Min Items( 1 ), <<Set Data Type( "Numeric" ) ),
Button Box( "SHIPDATE", colListb << Append( ColListData << Get Selected ) ),
ColListb = Col List Box( width( bwidth ), N Lines( 1 ), Max Items( 1 ), Min Items( 1 ), <<Set Data Type( "Numeric" ) ),
Button Box( "BUY Date", colListc << Append( ColListData << Get Selected ) ),
ColListc = Col List Box( width( bwidth ), N Lines( 1 ), Max Items( 1 ), Min Items( 1 ), <<Set Data Type( "Numeric" ) ),
Button Box( "Remove",
ColLista << RemoveSelected;
ColListb << RemoveSelected;
ColListc << RemoveSelected;
),
Spacer Box()
)
),
Lineup Box( N Col( 3 ), Spacing( 0, 3 ),
Spacer Box( <<Set Auto Stretching( 1, 0 ) ),
Button Box( "OK",
acol = ColLista << Get Items;
As Column( acol ) << Set Name( "build date" );
bcol = ColListb << Get Items;
As Column( bcol ) << set name( "shipping date" );
ccol = ColListc << Get Items;
As Column( ccol ) << set name( "buy date" );
box_win << Close Window;
),
Button Box( "Cancel", box_win << Close Window )
)
)
)
);
Hope this helps,
DS