View Full Version : Question on tables in a "formattedtext" field.
RTFallen
August 12th, 2014, 04:05
Is there a place in the ruleset that allows for changes to the tables in a "formattedtext" field or is that coded directly in the program itself?
Resire
Trenloe
August 12th, 2014, 04:24
Are you referring to editing a table in a formatted text control programmatically or changes to the way table tags are used?
If it's the latter, this is not possible as how the tags are read is all handled in the formattedtextcontrol: https://www.fantasygrounds.com/refdoc/formattedtextcontrol.xcp
If it is the former, there is no easy way to do this - if the control is a formattedtextfield https://www.fantasygrounds.com/refdoc/formattedtextfield.xcp (i.e. it is anchored on a database node - which most should be) then you can get to the database node, used .getValue() and extract the formattedtext. You could then parse through the text and edit the tags and use .setValue() back into the database node. However, you'd have to be very careful here as malformed FG XML would give errors that you might stop the control showing any info and you could only fix them by manually editing the FG campaign database.
RTFallen
August 12th, 2014, 05:05
It's the former, but I'm more looking for style changes then changing the data in the table. Was thinking about possible changes for my reference manual windowclass extension. Making the tables look better has always been on my todo list for the extension. I'm just trying to figure out if it's possible to programmatically alter how the table looks.
Sorry, should have been more clear in my original post.
Resire
Trenloe
August 12th, 2014, 06:00
Other than changing how the data is displayed within the table (using bold, italic, underline and title - which also determines the font used based off the control XML definition) and links, you're pretty limited to what you can do in terms of how the end table looks. All the rest is built into the formatted text control.
RTFallen
August 12th, 2014, 06:27
Oh well. Thanks for answering.
Resire
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.