cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
elizperez
Level II

JSL: working with display boxes, bolding elements, arranging

I'm trying to make a 2x2 contingency table manually and make it look pretty but I'm struggling working with the display boxes and specifically bolding, centering text etc. My main frustration is with trying to make the String Column Box values be bold (line 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", <<set font style( "Bold" ), <<Rotate Text( Left ) ),


  <<set background color( 9 ),


  <<top( 25 ), //pushes the title down so it's almost vertically centered with Pos/Neg rows


  << bottom( 20 ), //adds some space especially when the title might be just a few characters


  << Left( 5 ),


  <<Right( 1 ),


  <<sides( 15 )


  )


  ),


  V List Box(


  H List Box(


  Border Box(


  Text Box( "Sequencing Test", <<set font style( "Bold" ) ), //would be nice if "Sequencing Test" was centered over Pos,Neg


  << set background color( 2 ),


  <<top( 2 ),


  <<bottom( 2 ),


  <<Left( 55 ), //attempts to center the title over the Pos/Neg columns


  << 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", <<set font style( "Italic" ) ),


  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"} ),


  ),


  )


  ),


  )


  )


);


1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: JSL: working with display boxes, bolding elements, arranging

Seems that it isn't possible to set bold style in a StringColBox. You can try a TextBox() instead, but the alignment is hard to get perfect.

Example (the table box starting in line 29):

...

  Table Box(

  Text Box( "\!N\!tPos\!N\!tNeg", <<set font style( "Bold" ), <<set font size( 13 ) ),

  //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

  <<Set Row Borders( 1 ),

  <<Set Column Borders( 1 ),

  <<Set Shade Headings( 0 )

),

...

View solution in original post

1 REPLY 1
ms
Super User (Alumni) ms
Super User (Alumni)

Re: JSL: working with display boxes, bolding elements, arranging

Seems that it isn't possible to set bold style in a StringColBox. You can try a TextBox() instead, but the alignment is hard to get perfect.

Example (the table box starting in line 29):

...

  Table Box(

  Text Box( "\!N\!tPos\!N\!tNeg", <<set font style( "Bold" ), <<set font size( 13 ) ),

  //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

  <<Set Row Borders( 1 ),

  <<Set Column Borders( 1 ),

  <<Set Shade Headings( 0 )

),

...