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

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
SDF1
Super User

Modifying Text Boxes in Lineup Box()

Hello JSL'ers,

  I'm trying to modify/edit some properties of text boxes, but not having much success.

Here are the results I get (filename is removed, but seems to set the width for the 2nd column, which is causing problems, I think):

SDF1_3-1777475340447.png

And here are the results I want:

SDF1_2-1777475291544.png

I want to:

1) Right justify "ID:".

2) Have custom widths for certain text boxes (like the "1" for ID should be a fixed width, say 10)

3) Same with the date field -- custom width.

But, the usual methods like <<Set Width(xxx) or <<Justify Text("Right") aren't working. Is it because I'm using a Lineup Box() around everything? I could probably do this manually with HList Box() and VList Box(), but I'd rather not.

Here's the code that I'm currently working on:

results = New Window( "Results",
		Outline Box( "results",
			H List Box(
				Outline Box( "Information",
					Lineup Box( N Col( 3 ), Spacing(0, 3 ),
						tb = Text Box( "<b>ID:</b>", <<Markup ),
						Spacer Box( Size( 5, 0 ) ),
						Text Box( Char( rep ), <<Set Width( 10 ), <<Background Color( 69 ) ),
						Text Box( "Raw File Name:", <<Justify Text( "Right" ) ),
						Spacer Box( Size( 5, 0 ) ),
						Text Box( filechosen[1], <<Background Color( 69 ) ),
						Text Box( "Date:", <<Justify Text( "Right" ) ),
						Spacer Box( Size( 5, 0 ) ),
						Text Box( testdate, <<Background Color( 69 ) )
						
					)
				),
				gb,
				Panel Box( "Action", V List Box( Button Box( "Save Results" ), Button Box( "Cancel", results << Close Window ) ) )
			)
		)
	);
	tb << Justify Text( "Right" );

Thanks for the help!,

DS

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Modifying Text Boxes in Lineup Box()

The idea of lineup box is to remove "unnecessary" custom widths to fit your elements into columns. It will set the width them based on the highest width (unless you force it to use different width with lineup ruler box).

With the justify, I think the issues is that it doesn't work with <<Markup(1) properly.

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Modifying Text Boxes in Lineup Box()

The idea of lineup box is to remove "unnecessary" custom widths to fit your elements into columns. It will set the width them based on the highest width (unless you force it to use different width with lineup ruler box).

With the justify, I think the issues is that it doesn't work with <<Markup(1) properly.

-Jarmo
SDF1
Super User

Re: Modifying Text Boxes in Lineup Box()

Hi @jthi ,

  That's unfortunate about the <<Markup and <<Justify incompatibility. Upon further investigation, it turns out the Markup feature of JMP to interpret HTML-like code is limited to modification of text appearance like bold, italic, or underline, but not justification. Seems a bit strange to me, and one which could be updated in future versions.

  The Lineup Ruler Box() is the way to go with making those custom widths -- while also allowing one to have nicely aligned columns using the Lineup Box() inside the Lineup Ruler Box().

  As always, thanks for the help @jthi !

Thanks,
DS

Recommended Articles