Sign in to follow this  
Followers 0
SamIWas

PIO with text...background color?

4 posts in this topic

I have a PIO that I've created which has some text elements and those text elements must have a background fill to be readable.  My VW preferences are always set to create text without background fill, and unfortunately, this appears to affect PIOs regardless of PIO code.  

 

This is a snippet of the code:

FillPat(1);
FillFore(65535,65535,65535);
FillBack(65535,65535,65535);
PenPat(2);
PenFore(objcolor);
PenBack(objcolor);
			
TextJust(2);
TextVerticalAlign(3);
TextFont(GetFontID('Avenir Next Bold'));
TextSize(18);

TextOrigin(0,0);
CreateText(concat(distbase,CHR(39)));

No matter what I set FillPat two, it doesn't seem to make the text have a fill color.  I'm not finding something to set the fill color attribute to "solid" without using FillPat.  Am I missing something?

 

Edited by SamIWas
0

Share this post


Link to post
Share on other sites

Sam,

   Have you tried SetFPat()? This will override the document setting for Fill_Pattern.

 

TextOrigin(0,0);

CreateText(concat(distbase, CHR(39)));

SetFPat(LNewObj, 1);   { sets fill pattern to solid background, which uses the background fill color }

or

SetFPat(LNewObj, 2);   { sets fill pattern to solid foreground, which uses the foreground fill color }

 

HTH,

Raymond

0

Share this post


Link to post
Share on other sites

PS - Also try setting the fill colors to something other than WHITE. It may make it easier to spot when it does get applied.

0

Share this post


Link to post
Share on other sites

Thanks Raymond. SetFPat did work to put white behind he text. It just means adding those lines for every piece of text in the PIO, which is a little annoying. But, the important thing is that it works!

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0