<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />我正在尝试手动制作一个 2x2 列联表并使其看起来很漂亮但我正在努力处理显示框,特别是加粗、居中文本等。我主要的挫败感是试图使字符串列框值加粗(第 20 行)。
nw = New Window( "Custom Report",
Tab Box(
"Manual 2x2 Contingency",
V List Box(
H List Box(
V Center Box(
Border Box(
Text Box( "Mutant Test", <
<
<
<< bottom( 20 ), //adds some space especially when the title might be just a few characters
<< Left( 5 ),
<
<
)
),
V List Box(
H List Box(
Border Box(
Text Box( "Sequencing Test", <
<< set background color( 2 ),
<
<
<
<< Right( 50 ), //adds some visual space especially when the title might be just a few characters
<< sides( 15 )
)
),
Table Box(
String Col Box( "", {"Pos", "Neg"} ), //really wish these were bold!
Number Col Box( "Pos", {2225, 25} ), //would like borders or gridlines around just the numbers
Number Col Box( "Neg", {12, 2258} ) //would like borders or gridlines around just the numbers
),
Text Box( "" ), //visual space
Text Box( "" ), //visual space
Text Box( "" )//visual space
)
),
Outline Box( "Statistical Calculations", //add all the stats calculations and score confidence interval calculations
V List Box(
Table Box(
String Col Box( "Correlation Calculation",
{"Sensitivity / Positive Agreement", "Specificity / Negative Agreement", "Positive Predictive Value"}
),
String Col Box( " ", {" ", " ", " "} ), //visual space
String Col Box( "Equation", {"a/a+c", "d/b+d", "a/a+b"} ),
String Col Box( " ", {" ", " ", " "} ), //visual space
String Col Box( "Value", {"98.9%", "99.5%", "99.5%"} ),
String Col Box( " ", {" ", " ", " "} ), //visual space
String Col Box( "Score Confidence Interval", {"blah", "blah", "97.2-99.9"} )
),
Text Box( "" ), //visual space
Text Box( "Note: Calculated according to CLSI EP12-A2", <
Text Box( "" ) //visual space
)
),
Outline Box( "McNemars", //add the stats for McNemar determine if continuity correction is needed.
V List Box(
Table Box(
String Col Box( "McNemar", {"Degrees of Freedom", "P Value", "Chi", "Continuity Correction"} ),
String Col Box( " ", {" ", " ", " "} ), //visual space
String Col Box( "Value", {"1", ".002", "blah", "yes"} ),
String Col Box( " ", {" ", " ", " "} ), //visual space
String Col Box( "Intelligent Blurb", {"duh", "<0.05 means something", "words", "due to b+d<25"} ),
),
)
),
)
)
);
似乎无法在 StringColBox 中设置粗体样式。 您可以尝试使用 TextBox() 代替,但对齐方式很难达到完美。
示例(从第 29 行开始的表格框):
...
桌盒(
文本框( "\!N\!tPos\!N\!tNeg" , <<设置字体样式( “大胆的” ) , <<设置字体大小( 13 ) ) ,
//String Col Box( "", {"Pos", "Neg"} ), //真希望这些是粗体的!
编号栏框( “波斯” , { 2225 , 25 } ) , //想要仅在数字周围有边框或网格线
编号栏框( “否定” , { 12 , 2258 } ) , //想要仅在数字周围有边框或网格线
<<设置行边框( 1 ) ,
<<设置列边框( 1 ) ,
<<设置阴影标题( 0 )
) ,
...