2 Replies Latest reply on Nov 24, 2007 1:20 PM by WestSide

    NBSP; and MXML ???

    WestSide Level 1
      Hi,

      How I make a space in mxml? I have the following code:

      <mx:Label styleName="loginNameText" text="Welcome { modelLocator.userData[0].firstName + modelLocator.userData[0].lastName }" />

      The above code is all on one line in Flex Builder. The problem I am having is there is no space between the "first name" and the "last name"

      Any idea how I can put a space? I tried nbsp; in single quotes but no luck.

      -WestSide
        • 1. Re: NBSP; and MXML ???
          chris.huston.t10 Level 3
          Just add a space between two single quotes and add it like this:
          <mx:Label styleName="loginNameText" text="Welcome { modelLocator.userData[0].firstName + ' ' + modelLocator.userData[0].lastName }" />

          Vygo
          • 2. NBSP; and MXML ???
            WestSide Level 1
            Hi,

            Yes, I tried that initially before posting, but it did not work. It is 99% correct, I had to put an additional space between the quotes, maybe the code above has this space, but without the space and just single quote like so: '' did not work. I had to do this: ' '

            Thanks,

            -Westside