1 Reply Latest reply on May 22, 2011 8:04 AM by Gregory Lafrance

    Flex 4.5 mobile TextInput too wide

    Gregory Lafrance Level 6

      In the following view, the TextInput width always extends to the right edge of the display.

       

      Notice that I have the width of the TextInput set to 100% and the View has a paddingRight of 30. I've tried setting paddingRight for the HGroup and also paddingRight of the TextInput but nothing works. I don't want to set an explicit width for the TextInput.

       

      <?xml version="1.0" encoding="utf-8"?>
      <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
       xmlns:s="library://ns.adobe.com/flex/spark"
       title="ReminderPro Basic" backgroundColor="0xFF6699">
       <s:layout>
        <s:VerticalLayout gap="20" paddingTop="50" paddingLeft="30"
              paddingRight="30" paddingBottom="50"
              horizontalAlign="left"/>
       </s:layout>
       <s:Label text="Create a Reminder" fontSize="30" fontWeight="bold"/> 
       <s:HGroup verticalAlign="middle">
        <s:Label text="Name:" fontWeight="bold"/>
        <s:TextInput id="reminderName" width="100%"/>
       </s:HGroup>
       <s:Label text="Reminder type:" fontWeight="bold"/>
       <s:RadioButton label="countdown timer"/>
       <s:RadioButton label="scheduled alarm"/>
      </s:View>