cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
nikles
Level VI

Is there a way to Center Justify a NumberColBox?

Hi.  I'm wondering if there's a way to center justify the values in a NumberColBox.  I have a GUI and it would help make things more readable to the user if all my columns were center justified.  I can center justify strings in a StringColBox using << Set Justify(center), but I see no corresponding option for a NumberColBox.  I'm aware I could convert all my numeric values to text and use a StringColBox instead, but I was hoping a more elegant solution might exist.

 

Thanks.

JMP Pro 15.2.1

macOS Big Sur 11.6.2

3 REPLIES 3
txnelson
Super User

Re: Is there a way to Center Justify a NumberColBox?

The Script Editor is the definitive documentation for the messages and options available to the NumberColBox and I do not see a message or option that will set the justification.  I have used your stated work around, converting to a string, many times, and find that it works well.

Jim
nikles
Level VI

Re: Is there a way to Center Justify a NumberColBox?

Thanks Jim.  I was curious though, how do you convert a vector of numbers to a list of strings?  E.g. [1, 2, 3] --> {"1", "2", "3"}.  Is there a way to do this without using a for loop?

txnelson
Super User

Re: Is there a way to Center Justify a NumberColBox?

I typically don't do a mass conversion.  I do the conversion as I let the Text Box() or Text Edit Box do the automatic conversion for me

x = [1, 2, 3];
tb = Text Edit Box( x[2] );
Show( tb << get text );

 

Jim

Recommended Articles