Archived

This topic is now archived and is closed to further replies.

taguilo

Multiline="Yes" in Text elements on an XML Gauge

Recommended Posts

Hi All,I've trawled the net for hours looking for the answer to this question (I'm certain that a while ago I did stumble over an example, but can't find it now)...My question is, does the Multiline="Yes" attribute in the Text tag allow you to draw text in a block of lines ?ie. Text Line 1 Text Line 2 More Text Even more textIf so, how do you structure the the contents of the text element.I've tried things like:XXXYYYBut this only ever results in the LAST string declared being drawn.I read in the MSDN site that n will insert a newline in multiline text - it doesn't seem to work, it just draws n, eg:XXXnYYYproduces XXXnYYYI've also tried things like: XXX YYYto try and embed a newline in the string - still doesn't work.I have a vague memory of seeing something like XXXYYYBut that doesn't work either !Can anyone help with this - it's driving me bonkers. I know I could of course just set up two individual Text elements for the above example, but what if I want to render a block of text of varying numbers of lines, generated by some macro or other ?Anybody any ideas on this ??Dave.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

>>Anybody any ideas on this ??>Yes, you must use instead of .To insert a newline, use n like in your own example.Tom

Share this post


Link to post
Share on other sites

I've had the same problem. slash-n \n does not place the following text on a new line. I've resorted to stacking multiple text lines on top of each other.-Pv-

Share this post


Link to post
Share on other sites

You must use <FormattedText> instead of <Text>, which doesn't support any kind of formatting.Tom

Share this post


Link to post
Share on other sites

Hi,You must use FormattedText.For example an fmc page:<Element Name="departure"><FormattedText X="265" Y="230" Bright="Yes" Font="Arial" FontSize="14" Adjust="left" Color="White" LineSpacing="15" Tabs="15,25L,140C,255R,265R"><Font FontSize="15"/><String>\t\t\{fnt1}%((@c:FlightPlanDepartureAirportIdent))%!s!% DEPARTURES\t\t1 / 1\n\{lsp=20}\n\{fnt}< DEP1A >\t\t\t< DEP1B >\n\n< DEP2A >\t\t\t< DEP2B >\n\n< DEP3A >\t\t\t< DEP3B >\n\n< DEP4A >\t\t\t< DEP4B >\n\n< DEP5A >\t\t\t< DEP5B >\n\n< INDEX\t\t\tARR ></String></FormattedText></Element>Try and make yours.Hope it helps,Jan

Share this post


Link to post
Share on other sites