Jump to content
rosti

Color of a CHAR in Text Block

Recommended Posts

 

Is there a workaround VW2010 to retrieve color settings (penfore, fillback) of a CHAR within a text block?

How to use multiple colors in a text block programmatically? 

Edited by rosti

Share this post


Link to post

GetCharColor() is the call.  http://developer.vectorworks.net/index.php/VS:GetCharColor  It appears to have been added to 2016.  Sometimes calls are available earlier than documented, but it's probably not available as early as 2010.  

 

While you can set the text color for individual characters, the background color is the same for the entire text block, and you can just retrieve the object's attributes.

 

-Josh

Share this post


Link to post

Thank you,

 

I did try the edit command of the context menu. It shows the settings in the attributes panel (only for the first character) and there is no way of controlling the caret of a text block programmaticaly (?). 

Another way of thinking was to have a group of text blocks each with their own settings, but that would become to laborious, if even possible.  

 

Maybe setting a part of the string to bold or in another fonttype could might enable to derive some substring handles. 

 

Well I'll leave it to that...

 

Edited by rosti

Share this post


Link to post

 

On 2/28/2017 at 8:17 AM, JBenghiat said:

While you can set the text color

 

Hi @JBenghiat

Was trying to figure this out the other day. How can one set char colors? Not possible?

Share this post


Link to post

I can’t say I’ve ever needed to set color on a character by character basis, but I’m not aware of a method. You can set the color of an entire text block by setting the pen color. 

Share this post


Link to post

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.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...