<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic TextInput Alignment Works Differently with AppStudio but not AppStudio Player in ArcGIS AppStudio Questions</title>
    <link>https://community.esri.com/t5/arcgis-appstudio-questions/textinput-alignment-works-differently-with/m-p/787981#M965</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Hello All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I have noticed a problem with text alignment in TextInput QML objects in AppStudio Player. I added TextInput objects with custom heights based on the screen size and I set the verticalAlignment to TextInput.AlignVCenter, as I saw that in the documentation. I also set horizontalAlignment to TextInput.AlignHCenter. The text is centered as I expect when I run the app with AppStudio, however, when I run the app in AppStudio Player, the horizontal alignment is correct and the vertical alignment is off. Why is the behavior different between the two platforms and is there a way to make it work on both? Below I will show examples of the text alignment in AppStudio and then AppStudio Player both on the same page at the same resolution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;AppStudio:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;IMG __jive_id="454631" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/454631_pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;AppStudio Player:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;IMG __jive_id="454632" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/454632_pastedImage_2.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Keith&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jul 2019 16:19:13 GMT</pubDate>
    <dc:creator>KeithLarson1</dc:creator>
    <dc:date>2019-07-29T16:19:13Z</dc:date>
    <item>
      <title>TextInput Alignment Works Differently with AppStudio but not AppStudio Player</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/textinput-alignment-works-differently-with/m-p/787981#M965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Hello All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I have noticed a problem with text alignment in TextInput QML objects in AppStudio Player. I added TextInput objects with custom heights based on the screen size and I set the verticalAlignment to TextInput.AlignVCenter, as I saw that in the documentation. I also set horizontalAlignment to TextInput.AlignHCenter. The text is centered as I expect when I run the app with AppStudio, however, when I run the app in AppStudio Player, the horizontal alignment is correct and the vertical alignment is off. Why is the behavior different between the two platforms and is there a way to make it work on both? Below I will show examples of the text alignment in AppStudio and then AppStudio Player both on the same page at the same resolution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;AppStudio:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;IMG __jive_id="454631" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/454631_pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;AppStudio Player:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;IMG __jive_id="454632" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/454632_pastedImage_2.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Keith&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2019 16:19:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/textinput-alignment-works-differently-with/m-p/787981#M965</guid>
      <dc:creator>KeithLarson1</dc:creator>
      <dc:date>2019-07-29T16:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: TextInput Alignment Works Differently with AppStudio but not AppStudio Player</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/textinput-alignment-works-differently-with/m-p/787982#M966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Keith,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is strange.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What version of AppStudio Desktop vs AppStudio Player are you running?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you share the code snippet for&amp;nbsp;the TextInput so that we can try to reproduce this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Erwin&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2019 16:53:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/textinput-alignment-works-differently-with/m-p/787982#M966</guid>
      <dc:creator>ErwinSoekianto</dc:creator>
      <dc:date>2019-07-29T16:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: TextInput Alignment Works Differently with AppStudio but not AppStudio Player</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/textinput-alignment-works-differently-with/m-p/787983#M967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Erwin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The version of AppStudio Player is 3.3.29 and I am using the beta of AppStudio version 4.0.59.&amp;nbsp;I was trying to get a simplified sample for the TextInput and I fixed the issue there. For some reason, when I set the height as a multiple of the height of another object in the same row, it would throw off the alignment. So, I changed the height of the TextInput to be calculated differently and made sure anchors.verticalCenter = parent.verticalCenter and it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I also have TextFields in the row, which also are not aligning properly. I wrote a simplfied version of a TextField that is not centering the text in AppStudio Player, but is centering in regular AppStudio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AppStudio:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/454664_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;AppStudio Player:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/454666_pastedImage_5.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;TextField {
  id: textField
  anchors.verticalCenter: parent.verticalCenter
  text: defaultCost
  horizontalAlignment: TextInput.AlignHCenter
  verticalAlignment: TextInput.AlignVCenter
  validator: DoubleValidator { decimals: 2 }
  color: Qt.black
  width: background.width
  height: 35

  background: Rectangle {
    anchors.centerIn: parent
    height: parent.height
    width: 250
    color: Qt.white
    border.color: Qt.black
  }
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:59:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/textinput-alignment-works-differently-with/m-p/787983#M967</guid>
      <dc:creator>KeithLarson1</dc:creator>
      <dc:date>2021-12-12T08:59:59Z</dc:date>
    </item>
  </channel>
</rss>

