みんなこんにちは!2つのシリーズのチャートからいずれかを選択するためのユーザーウィンドウを生成しました。 シリーズは、「曲線のみ」または「曲線とデータポイント」です。 私の問題は、「すべての曲線を選択」および「すべての曲線と点を選択」オプションも必要だということです。 2つの[すべて選択]チェックボックスは非常に効果的です。ただし、カーブチャート側で何かを選択し、[すべてのカーブとポイントを選択]チェックボックスを選択しない場合(選択および選択解除も)、1つ以上を個別に選択すると、選択したカーブチャートとデータポイントチャートは選択されません。作成するチャートのリストに入力します。 私は何を間違えていますか?コードが含まれています。 私の問題をご覧いただきありがとうございます!
//Generate charts for selected data
GetCharts = {};
GetDPCharts = {};
//Window for user to select which charts to be generated
WhatCharts = New Window( "Select Curve Charts to Generate", << Modal,
<< On open( WhatCharts << Window Size( 200, 100 ) ),
H List Box(
//All charts wtih ONLY curves
cbAllCharts = Check Box( {"By Condition", "By Cond No", "By Sample", "Average by Condition"} ),
Spacer Box( Size( 10, 0 ) ),
//Charts with Data Points AND Curves
cbAllDPCharts = Check Box( {"By Condition w/ Data Points", "By Cond No w/ Data Points", "By Sample w/ Data Points", "Average by Condition w/ Data Points"})
),
//Allow the user to select all charts
H List Box(
cbAll = Check Box( " ",
<< Set Function(
Function( {this},
cbAllCharts << Set All( this << Get, run script( 1 ) )
)
),
),
Text Box( "Select All Curve Plots" ),
Spacer Box( Size( 9, 0 ) ),
cbAll2 = Check Box( " ",
<< Set Function(
Function( {this},
cbAllDPCharts << Set All( this << Get, run script( 1 ) )
)
),
),
Text Box( "Select all Points and Curve Plots" ),
),
H Center Box( Button Box( "OK", GetChkBoxes )
)
);
//Place all selections into one list
if( N Items( GetDPCharts ) > 0,
For( i = 1, i<= N Items( GetDPCharts ), i++,
Insert Into( GetCharts, GetDPCharts[i] )
)
);
//Expressions
GetChkBoxes = Expr(
GetCharts = cbAllCharts << Get Selected;
GetDPCharts = cbAllDPCharts << Get Selected;
);
Print( GetCharts, GetDPCharts );各チェックボックスに独自の関数を指定し、すべての関数の名前が異なることを確認してください。
//Generate charts for selected databutton
GetCharts = {};
GetDPCharts = {};
//Window for user to select which charts to be generated
WhatCharts = New Window( "Select Curve Charts to Generate", << Modal, << Return Result,
//<< On open( WhatCharts << Window Size( 200, 100 ) ),
H List Box(
//All charts wtih ONLY curves
cbAllCharts = Check Box( {"By Condition", "By Cond No", "By Sample", "Average by Condition"},
<<SETFUNCTION> 0,
For( i = 1, i<= N Items( GetDPCharts ), i++,
Insert Into( GetCharts, GetDPCharts[i] )
)
);
Print( GetCharts, GetDPCharts );</SETFUNCTION>