有沒有辦法在Tablebox中強調某些行?
我甚至對在行下方繪製的圖形線感到滿意。 我當然可以為任何行著色,但更喜歡一條線(作為表內某些點的水平分離)。 thx,DJ
您可以使用註釋,用戶可以移動它們:

Names default to here( 1 );
win = New Window("Text Box",
tb = Table Box(
sb = String Col Box( "letter", {"a", "b"} ),
neb = Number Col Box( "number", { 1 , 2 } )
),
<< Padding( 10 )
);
//add more rows
for( i=1, i<=10, i++, tb << Add Row( {"c", 3} ) );
//make sure table is redrawn so it has the correct size
win << redraw;
wait(0);
//Function to calculate the position of the bottom of a row within the table then
//draw a line on top of the table
AddLine = function( {tablebox, row},
ht = tablebox << Get Height;
w = tablebox << Get Width;
nrows = N Items( Words( sb << Get XML, "\!N" ) ) - 2;
tablebox << Add Line Annotation(
Line( 1, floor( row * ht / nrows ) + 1, w, floor( row * ht / nrows ) + 1 )
);
);
//Draw some lines
AddLine( tb, 2); AddLine( tb, 8); AddLine( tb, 12 );