• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FS2004 VerticalAdjust Not Working in XML FormattedText Elements

Messages
252
Country
us-kentucky
Hi all,

Strange problem that I cannot say I've run into before, though admittedly I am rather inexperienced with using text elements in XML.

I have some text that I want to be adjusted vertically to the center of it's text box. Here's a very simple example:

Code:
<Element>
    <Position X="912" Y="264"/>
    <Visible>(L:Status Page, number)</Visible>
        <FormattedText X="96" Y="53" Bright="Yes" Font="Arial Bold" FontSize="14" Color="#121212" Adjust="Center" VerticalAdjust="Center">
            <String>
            DOORS
            </String>
        </FormattedText>
</Element>

However, no matter what I set VerticalAdjust to (Top, Center, or Bottom) the text is always stubbornly aligned to the top of the text box. The horizontal adjust, and every other parameter set above for that matter, function just fine. What am I missing?
 
The text is going to be put at the X/Y position you specify in the position statement, no matter what you set in the vertical adjustment line. The gauge has no way of knowing where the top and bottom of that box is. I presume there are more sophisticated drawing (or text?) commands that would set the top and bottom of an area, but I don’t know them and have never used them.

Perhaps increasing the Y value in the formatted text statement might do something, but I doubt it’s what you want?
 
That seems counter-intuitive to me. To my understanding, the Position= line after the <Element> section defines the top left corner of the text box, and the following X= and Y= statements define the size of the text box. I can verify this by setting the text to a large size which exceeds the size of the text box, causing the characters to be clipped. By that logic, a VerticalAdjust statement should center the text vertically by calculating the middle position of the Y= value and placing the text there, no? If not, then what is the point of the VerticalAdjust statement? Does it just not work at all?
 
Back
Top