テーブルボックス内の列の条件付き書式設定こんにちは。テーブル ボックス内の 2 つのデータ列に 1 つの条件付き書式ルールを適用したいと考えています。 以下に、問題を説明するビッグ クラス データ セットを使用した例を設定しました。データ テーブル内で必要なことを簡単に実行できますが、テーブル ボックス内で同じ効果を生成するのは少し難しいようです。
テーブル ボックスの列の条件付き書式を作成するメカニズムは、データ テーブルに必要なメカニズムとはまったく異なり、図に示すように [基本設定] 内でルールを設定する必要があります。 この部分は非常に簡単ですが、ルールが直接関係する列以外の列にそのルールを適用する方法がわかりません。 それはできるでしょうか?
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
// Color-code blue all pupils whose height is at least 60, with everybody else purple;
// First color every cell in both the name and height columns purple;
Column( dt, "name" ) << color cells( RGB Color( 255, 0, 255 ), Index( 1, N Row( dt ) ) );
Column( dt, "height" ) << color cells( RGB Color( 255, 0, 255 ), Index( 1, N Row( dt ) ) );
// Now find everybody whose height is at least 60, and color them blue;
CellsToPaint = dt << get rows where( :Height >= 60 );
Show( CellsToPaint );
// Color them all blue;
Column( dt, "name" ) << color cells( RGB Color( 100, 100, 255 ), CellsToPaint );
Column( dt, "height" ) << color cells( RGB Color( 100, 100, 255 ), CellsToPaint );
// Now I'll try to produce the same effect with those two columns in a table box;
// Create a copy of the Big Class data table in a table box;
My_TB = Table Box( <<SET shade="" alternate="" rows=""></SET>
Re: テーブルボックス内の列の条件付き書式設定ジム、本当にありがとう - それは独創的ですね!
記録のために、これを解決する方法に関するあなたの推奨事項を組み込んだ、元のスクリプトの修正版のコピーを以下に追加します。 もう一度感謝します。これは私にとって非常に役に立ちます。
Clear Log();
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
// Color-code blue all pupils whose height is at least 60, with everybody else purple;
// First color every cell in both the name and height columns purple;
Column( dt, "name" ) << color cells( RGB Color( 255, 0, 255 ), Index( 1, N Row( dt ) ) );
Column( dt, "height" ) << color cells( RGB Color( 255, 0, 255 ), Index( 1, N Row( dt ) ) );
// Now find everybody whose height is at least 60, and color them blue;
CellsToPaint = dt << get rows where( :Height >= 60 );
Show( CellsToPaint );
// Color them all blue;
Column( dt, "name" ) << color cells( RGB Color( 100, 100, 255 ), CellsToPaint );
Column( dt, "height" ) << color cells( RGB Color( 100, 100, 255 ), CellsToPaint );
// Now I'll produce the same effect with those two columns in a table box using Jim's suggestion;
// Export it to the journal as a data table, which converts it into a TableBox in the process;
dt << journal;
// Pull it back again as a TableBox, putting into a window with any other objects that I might want to incorporate;
nw = New Window( "My Window",
Lineup Box( N Col( 1 ),
Text Box( "Clever, huh?" ),
Border Box( Current Journal()[Table Box( 1 )], <<SIDES></SIDES>
Re: テーブルボックス内の列の条件付き書式設定条件付き書式ルールを作成する解決策がありません。 ただし、色付きのデータ テーブルをジャーナルに移動し、そのジャーナルから作成しているアプリケーションに TableBox(1) を追加することで、希望することは達成できました。
