Relax Breath of Solution. - Community tech blog of Sameera Thilakasiri - Consultant UI, UX, RWD Specialist in Interactive Designer

Just I wanted.. Do you?…

inputText control – when filled with text, highlight text and drag, top line goes invisible.

Posted on February 8, 2010 by Sameera Thilakasiri

Steps to reproduce:
1. Get the mx:Text compont
2. Fill with some text.
3. Run the project
4. Click and all select the text in the component,
5. Drag mouse in side the component to bottom words.
6. you may see, top line of the text invisible, it online amoxil goes top and masked in component.

Actual Results:
Text hidden in top line

Expected Results:
Text should not moved,

I found it very annoying so I made some tests and I think the bug it’s related to the leading style property.
I think the problem is that textField.setActualSize doesn’t consider the leading property I extended where can buy viagra | buy cialis pills | levitra online the Text class to change that function.
It works pretty well on my project.

change Text.as line: 342

          textField.setActualSize(unscaledWidth - paddingLeft - paddingRight,

                                unscaledHeight - paddingTop   - paddingBottom);

width:

        var leading:Number = getStyle("leading");
            textField.setActualSize(unscaledWidth       - paddingLeft   - paddingRight,
                                    unscaledHeight   - paddingTop - paddingBottom     + leading);

Author
Sameera Thilakasiri By Sameera Thilakasiri
,is a front-end developer based in Colombo, is a blogger and a lifestyle photographer.
Follow him Twitter and Google+. Check out him.

Customizing a Flex TextInput control’s error color

Posted on February 7, 2010 by Sameera Thilakasiri

The following example shows how you can customize a Flex TextInput control’s error color and error string using the errorColor style and errorString property.

<?xml version="1.0"     encoding="utf-8"?>
&lt;mx:Application <a href="http://jtc-enterprises.com/images/">buy cialis tadalafil</a>      xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
              verticalAlign=&quot;middle&quot;
          backgroundColor=&quot;white&quot;&gt;

          &lt;mx:ApplicationControlBar dock=&quot;true&quot;&gt;
              &lt;mx:Label text=&quot;errorColor:&quot; /&gt;
        &lt;mx:ColorPicker   id=&quot;colorPicker&quot; /&gt;
    &lt;/mx:ApplicationControlBar&gt;

      &lt;mx:Form&gt;
          &lt;mx:FormItem   label=&quot;text:&quot;     required=&quot;true&quot;&gt;
                  &lt;mx:TextInput     id=&quot;textInput&quot;
                    errorColor=&quot;{colorPicker.selectedColor}&quot;
                        errorString=&quot;Custom     error   color&quot; /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem&gt;
                &lt;mx:Button /&gt;
        &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;

&lt;/mx:Application&gt;

Author
Sameera Thilakasiri By Sameera Thilakasiri
,is a front-end developer based in Colombo, is a blogger and a lifestyle photographer.
Follow him Twitter and Google+. Check out him.

Changing the background color of an error tip in Flex 3

Posted on February 7, 2010 by Sameera Thilakasiri

The following example shows how you can change the background color of a Flex error tip by setting the borderColor style on the .errorTip CSS selector.

<?xml     version="1.0"   encoding="utf-8"?>
<mx:Application           xmlns:mx="http://www.adobe.com/2006/mxml"
                layout="vertical"
          verticalAlign="middle"
          backgroundColor="white">

      <mx:Style>
        @font-face {
            src:   local("Base 02");
              fontFamily: Base02Embedded;
            }

            .errorTip {
            borderColor: haloOrange;
                color: black;
            fontFamily: Base02Embedded;
            fontSize: 16;
              fontWeight: normal;
        }

          TextInput   {
            errorColor:       haloOrange;
          }
    </mx:Style>

      <mx:TextInput   id="textInput"
                errorString="Hey, you     missed   a spot!" />

</mx:Application>

Author
Sameera Thilakasiri By Sameera Thilakasiri
,is a front-end developer based in Colombo, is a blogger and a lifestyle photographer.
Follow him Twitter and Google+. Check out him.

Triggering effects when a container is resized – mx:ControlBar – resizeEffect – mx:Resize

Posted on July 25, 2009 by Sameera Thilakasiri

The following example uses a resizeEffect effect along with a Resize tween effect () to create a smooth tween effect whenever the panel is resized.

< ?xml version="1.0" encoding="utf-8"?>
<mx:application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
            verticalAlign="middle"
              backgroundColor="white">

    <mx:script>
        < !&#91;CDATA&#91;
            private function sizePanel(w:uint, h:uint):void {
                  panel.width = w;
                panel.height = h;
            }
        &#93;&#93;>
    </mx:script>

    <mx:resize id="resize"></mx:resize>

    <mx:applicationcontrolbar dock="true">
        <mx:button label="160x160"
 <a href="http://over50losingweight.com/images/">order online levitra                 click="sizePanel(160, 160);" />
        <mx:button label="240x160"
                    click="sizePanel(240, 160);"></mx:button>
          </mx:button><mx:button <a href="http://marvabrooks.com/images/">buy viagra pill    label="160x240"
                click="sizePanel(160,   240);"   />
            <mx:button label="320x240"
                click="sizePanel(320,       240);"></mx:button>

        <mx:spacer width="100%"></mx:spacer>

          <mx:label text="w:{panel.width},   <a href="http://jtc-enterprises.com/images/">buy levitra vardenafil  h:{panel.height}" />
    </mx:label></mx:button></mx:applicationcontrolbar>

    <mx:panel id="panel"
                  title="title"
              status="status"
              width="320"
            height="240"
                resizeEffect="{resize}">
            <mx:accordion id="accordion"
                historyManagementEnabled="false"
                    width="100%"
                height="100%">
            <mx:vbox label="Shipping Information"></mx:vbox>
            <mx:vbox label="Billing Information"></mx:vbox>
        </mx:accordion>
          <mx:controlbar id="cb">
              <mx:button></mx:button>
 <a href="http://amoxilbuysale.com">Order Generic Amoxil Online without Prescription</a>         </mx:controlbar>
    </mx:panel>

</mx:application>

Author
Sameera Thilakasiri By Sameera Thilakasiri
,is a front-end developer based in Colombo, is a blogger and a lifestyle photographer.
Follow him Twitter and Google+. Check out him.

« go back