cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-462246%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%C2%BFHay%20alguna%20forma%20de%20justificar%20al%20centro%20un%20NumberColBox%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-462246%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHola.%20Me%20pregunto%20si%20hay%20una%20forma%20de%20justificar%20los%20valores%20en%20un%20NumberColBox.%20Tengo%20una%20GUI%20y%20ayudar%C3%ADa%20a%20que%20las%20cosas%20fueran%20m%C3%A1s%20legibles%20para%20el%20usuario%20si%20todas%20mis%20columnas%20estuvieran%20justificadas%20en%20el%20centro.%20Puedo%20centrar%20cadenas%20en%20un%20StringColBox%20usando%20%26lt%3B%26lt%3B%20Set%20Justify(center)%2C%20pero%20no%20veo%20ninguna%20opci%C3%B3n%20correspondiente%20para%20un%20NumberColBox.%20Soy%20consciente%20de%20que%20podr%C3%ADa%20convertir%20todos%20mis%20valores%20num%C3%A9ricos%20en%20texto%20y%20usar%20un%20StringColBox%20en%20su%20lugar%2C%20pero%20esperaba%20que%20pudiera%20existir%20una%20soluci%C3%B3n%20m%C3%A1s%20elegante.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGracias.%3C%2FP%3E%3CP%3EJMP%20Pro%2015.2.1%3C%2FP%3E%3CP%3EmacOS%20Big%20Sur%2011.6.2%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-462246%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3Esecuencias%20de%20comandos%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-462265%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%C2%BFHay%20alguna%20forma%20de%20justificar%20al%20centro%20un%20NumberColBox%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-462265%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EEl%20Editor%20de%20scripts%20es%20la%20documentaci%C3%B3n%20definitiva%20para%20los%20mensajes%20y%20opciones%20disponibles%20para%20NumberColBox%20y%20no%20veo%20un%20mensaje%20u%20opci%C3%B3n%20que%20establezca%20la%20justificaci%C3%B3n.He%20usado%20su%20trabajo%20indicado%2C%20convirtiendo%20a%20una%20cadena%2C%20muchas%20veces%2C%20y%20descubro%20que%20funciona%20bien.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-462316%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20%C2%BFHay%20alguna%20forma%20de%20centrar%20y%20justificar%20un%20NumberColBox%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-462316%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ENormalmente%20no%20hago%20una%20conversi%C3%B3n%20masiva.%20Hago%20la%20conversi%C3%B3n%20dej%C3%A1ndole%20al%20Cuadro%20de%20texto()%20o%20al%20Cuadro%20de%20edici%C3%B3n%20de%20texto%20que%20realice%20la%20conversi%C3%B3n%20autom%C3%A1tica%20por%20m%C3%AD.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ex%20%3D%20%5B1%2C%202%2C%203%5D%3B%0Atb%20%3D%20Text%20Edit%20Box(%20x%5B2%5D%20)%3B%0AShow(%20tb%20%26lt%3B%26lt%3B%20get%20text%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E
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