cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
NRW
NRW
Level IV

Set Text Box Font to "Light" style

Folks,

 

Trying to alter the text in a text box so that the style is lighter than normal font. However, the script piece I attached still does not do the trick. I've tried looking at multiple command variations via Scripting Index, but still can't get it to change. I've tried changing the color to give a light appearance. 

What am I missing here?

 

Many thanks

 

Neil

 

 

 

conf = Expr(
				H List Box(
					spacer box(),
					y =Text box("Footer",
							<< Set Wrap(500),
							<< Set Font("Calibri", 30, "Light"),	
					),
					spacer box(),	
				));
Neil
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Set Text Box Font to "Light" style

Here is a structure that I was able to use to get the font color to work

txnelson_0-1624668430357.png

Names Default To Here( 1 );

conf = Expr(
	H List Box(
		Spacer Box(),
		y = Text Box( "Footer", <<Set Wrap( 500 ), <<Set Font( "Calibri", 30 ) ),
		Spacer Box(), 

	);
	
);

New Window( "test", conf, y << Font Color( "Gray" ) );

 

Jim

View solution in original post

4 REPLIES 4
gzmorgan0
Super User (Alumni)

Re: Set Text Box Font to "Light" style

@NRW ,

I am not familiar with Font Style "Light."  I would change the font color to gray.  See script below,


New Window("test",

	H List Box(
		Spacer Box(),
		y = Text Box( "Footer", <<Set Wrap( 500 ), <<Set Font( "Calibri", 30 ), ),
		Spacer Box(),

	) 
);
Wait( 2 );
y << Font Color( "Gray" );

 

NRW
NRW
Level IV

Re: Set Text Box Font to "Light" style

Many thanks for the reply!

 

In order for it to work within the expression I attached, what needs to be changed? The insertion of the font color, the way I have it does not work.

 

 

conf = Expr(
				H List Box(
					spacer box(),
					y =Text box("Footer",
							<< Set Wrap(500),
							<< Set Font("Calibri", 30),	
					),
					spacer box(),	
				)
y << Font Color("Gray");
);

 

Neil
txnelson
Super User

Re: Set Text Box Font to "Light" style

Here is a structure that I was able to use to get the font color to work

txnelson_0-1624668430357.png

Names Default To Here( 1 );

conf = Expr(
	H List Box(
		Spacer Box(),
		y = Text Box( "Footer", <<Set Wrap( 500 ), <<Set Font( "Calibri", 30 ) ),
		Spacer Box(), 

	);
	
);

New Window( "test", conf, y << Font Color( "Gray" ) );

 

Jim
NRW
NRW
Level IV

Re: Set Text Box Font to "Light" style

Gentlemen,

 

Many thanks for your generous time. Your suggestions worked. This was helpful since I have several Expressions which are image and title sub blocks that integrate into a final image that gets copied to PowerPoint (script attached with your solution).

 

As an aside, I tripped across a possible alternate approach (via Scripting Guide - p. 558) using HTML Tags. I tried this  which works as well. 

 

Again I'm very grateful for your valuable time.

 

Neil

 

 

 

 text = Expr(
			H List Box(		
				spacer box(),
				y = Text Box("Footer", 
				<< Set Wrap(500),
				<< Set Font("Calibri", 18, "bold"),
				spacer box(),		
			)
		);	

nw6 = Expr(
			V List Box(
				text,
				spacer box(size(5,50)),
				nw4
			)	
		);	

nw7 = New Window("title_7", nw6, y<< Font Color("Gray") );

// ** Alternate **  HTML Tags//

 text = Expr(
			H List Box(		
				spacer box(),
				y = Text Box("<font color='Gray'>Footer</font>", 
				<< Set Wrap(500),
				<< Set Font("Calibri", 18, "bold"),
				<<Markup),
				spacer box(),		
			)
		);	

 

 

Neil