rosti Posted February 27, 2017 Share Posted February 27, 2017 (edited) 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 February 27, 2017 by rosti Quote Link to comment
JBenghiat Posted February 27, 2017 Share Posted February 27, 2017 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 Quote Link to comment
rosti Posted March 1, 2017 Author Share Posted March 1, 2017 (edited) 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 March 1, 2017 by rosti Quote Link to comment
twk Posted October 30, 2018 Share Posted October 30, 2018 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? Quote Link to comment
JBenghiat Posted November 1, 2018 Share Posted November 1, 2018 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. Quote Link to comment
Recommended Posts
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.