login+cursor+blink

2 views
Skip to first unread message

Flex Baby

unread,
Apr 9, 2009, 10:48:27 AM4/9/09
to Cleveland Adobe Flex Users Group
hi,
i have 2 text boxes for username & password.In page load,the cursor is
not selected the username by default.
how make the username by default(blinking cursor) at startup?
i used the following methods

Dan Vega

unread,
Apr 9, 2009, 10:50:03 AM4/9/09
to cle...@googlegroups.com
txtbox.setFocus();

Thank You
Dan Vega
dan...@gmail.com
http://www.danvega.org

Flex Baby

unread,
Apr 9, 2009, 10:53:49 AM4/9/09
to Cleveland Adobe Flex Users Group
hi,
i have 2 text boxes for username & password.In page load,the cursor is
not selected the username by default.
how make the username by default(blinking cursor) at startup?
i used the following methods


callLater(username1.setFocus());
focusManager.setFocus(username1);
focusManager.showFocus();
stage.focus=username1;
username1.setFocus();

/* username1.focusEnabled=true;
focusManager.showFocusIndicator = true;
focusManager.setFocus(username1);
username1.setSelection(0,0);
username1.focusManager.setFocus(username1);
focusManager.showFocusIndicator=true;
focusManager.setFocus(username1);
username1.focusEnabled=true;
username1.drawFocus(true);

but not working

On Apr 9, 7:50 pm, Dan Vega <danv...@gmail.com> wrote:
> txtbox.setFocus();
>
> Thank You
> Dan Vega
> danv...@gmail.comhttp://www.danvega.org

Flex Baby

unread,
Apr 9, 2009, 10:56:22 AM4/9/09
to Cleveland Adobe Flex Users Group
it not working Dan...

On Apr 9, 7:50 pm, Dan Vega <danv...@gmail.com> wrote:
> txtbox.setFocus();
>
> Thank You
> Dan Vega
> danv...@gmail.comhttp://www.danvega.org

Dan Vega

unread,
Apr 9, 2009, 10:59:47 AM4/9/09
to cle...@googlegroups.com
are you doing after the text box is created?

are you doing it when it loads? using creationComplete() ?



Thank You
Dan Vega
dan...@gmail.com
http://www.danvega.org

Flex Baby

unread,
Apr 9, 2009, 11:07:32 AM4/9/09
to Cleveland Adobe Flex Users Group
ya this is my coding

<mx:Application xmlns:mx ="http://www.adobe.com/2006/mxml"
xmlns ="com.esri.solutions.flexviewer.*"
layout ="absolute"
applicationComplete ="registerGlobalKeyHandler()"
creationComplete="{init()}"
backgroundColor ="#6E6E6E"
horizontalScrollPolicy="off"
verticalScrollPolicy="off"
pageTitle="NOPD FlexViewer"
addedToStage="stage.focus=null;"
>

private function init():void
{

username1.setFocus();
}

On Apr 9, 7:59 pm, Dan Vega <danv...@gmail.com> wrote:
> are you doing after the text box is created?
>
> are you doing it when it loads? using creationComplete() ?
>
> Thank You
> Dan Vega
> danv...@gmail.comhttp://www.danvega.org
Reply all
Reply to author
Forward
Message has been deleted
0 new messages