Jump to content
Developer Wiki and Function Reference Links ×

PIO with text...background color?


SamIWas

Recommended Posts

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
Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...