You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by mark goldin <ma...@gmail.com> on 2013/10/08 21:24:49 UTC

setFocus does not create a border

I am setting up a focus over a control like this:
control.setFocus();

When I tab out of it the next control gets a focus meaning my first control
did have a focus. Unfortunately setFocus does not create a blue border
around first control. Is that can be fixed?

Thanks

Re: setFocus does not create a border

Posted by Alex Harui <ah...@adobe.com>.
Then there might be something else going on.  You'll have to try to nail
down a way to reproduce the problem consistently.  Focus to a TextInput
can be deferred (also by callLater) in some scenarios which could
interfere with your attempt.

Another test is to put in a 5 second timer before calling showFocus and
see if that works consistently.  If so, then you know there is some timing
issue involved.

On 10/10/13 9:20 AM, "mark goldin" <ma...@gmail.com> wrote:

>I dont know if I am doing it right but this is still inconsistent:
>field.setFocus();
>field.focusManager.showFocus();
>field.callLater(field.callLater, [field.focusManager.showFocus]);
>
>
>On Thu, Oct 10, 2013 at 10:56 AM, Alex Harui <ah...@adobe.com> wrote:
>
>> Sometimes with this focus stuff, you may need a couple of callLaters
>> chained together.
>>
>> On 10/10/13 7:49 AM, "mark goldin" <ma...@gmail.com> wrote:
>>
>> >Actually I was to quick jumping to conclusion. The following code does
>>the
>> >job but it's inconsistent.
>> >field.setFocus();
>> >field.focusManager.showFocus();
>> >
>> >Sometimes I see the border sometimes not. I tried using callLater, the
>> >same.
>> >
>> >
>> >On Wed, Oct 9, 2013 at 11:25 AM, Alex Harui <ah...@adobe.com> wrote:
>> >
>> >> If it works for you, then yes.
>> >> ________________________________________
>> >> From: mark goldin [markzolotoy@gmail.com]
>> >> Sent: Wednesday, October 09, 2013 7:30 AM
>> >> To: users
>> >> Subject: Re: setFocus does not create a border
>> >>
>> >> I've got this working for me:
>> >> field.drawFocus(true);
>> >>
>> >> Is it the same?
>> >>
>> >>
>> >> On Tue, Oct 8, 2013 at 5:41 PM, Alex Harui <ah...@adobe.com> wrote:
>> >>
>> >> > Try focusManager.showFocus()
>> >> > ________________________________________
>> >> > From: mark goldin [markzolotoy@gmail.com]
>> >> > Sent: Tuesday, October 08, 2013 12:24 PM
>> >> > To: users
>> >> > Subject: setFocus does not create a border
>> >> >
>> >> > I am setting up a focus over a control like this:
>> >> > control.setFocus();
>> >> >
>> >> > When I tab out of it the next control gets a focus meaning my first
>> >> control
>> >> > did have a focus. Unfortunately setFocus does not create a blue
>>border
>> >> > around first control. Is that can be fixed?
>> >> >
>> >> > Thanks
>> >> >
>> >>
>>
>>


Re: setFocus does not create a border

Posted by mark goldin <ma...@gmail.com>.
I dont know if I am doing it right but this is still inconsistent:
field.setFocus();
field.focusManager.showFocus();
field.callLater(field.callLater, [field.focusManager.showFocus]);


On Thu, Oct 10, 2013 at 10:56 AM, Alex Harui <ah...@adobe.com> wrote:

> Sometimes with this focus stuff, you may need a couple of callLaters
> chained together.
>
> On 10/10/13 7:49 AM, "mark goldin" <ma...@gmail.com> wrote:
>
> >Actually I was to quick jumping to conclusion. The following code does the
> >job but it's inconsistent.
> >field.setFocus();
> >field.focusManager.showFocus();
> >
> >Sometimes I see the border sometimes not. I tried using callLater, the
> >same.
> >
> >
> >On Wed, Oct 9, 2013 at 11:25 AM, Alex Harui <ah...@adobe.com> wrote:
> >
> >> If it works for you, then yes.
> >> ________________________________________
> >> From: mark goldin [markzolotoy@gmail.com]
> >> Sent: Wednesday, October 09, 2013 7:30 AM
> >> To: users
> >> Subject: Re: setFocus does not create a border
> >>
> >> I've got this working for me:
> >> field.drawFocus(true);
> >>
> >> Is it the same?
> >>
> >>
> >> On Tue, Oct 8, 2013 at 5:41 PM, Alex Harui <ah...@adobe.com> wrote:
> >>
> >> > Try focusManager.showFocus()
> >> > ________________________________________
> >> > From: mark goldin [markzolotoy@gmail.com]
> >> > Sent: Tuesday, October 08, 2013 12:24 PM
> >> > To: users
> >> > Subject: setFocus does not create a border
> >> >
> >> > I am setting up a focus over a control like this:
> >> > control.setFocus();
> >> >
> >> > When I tab out of it the next control gets a focus meaning my first
> >> control
> >> > did have a focus. Unfortunately setFocus does not create a blue border
> >> > around first control. Is that can be fixed?
> >> >
> >> > Thanks
> >> >
> >>
>
>

Re: setFocus does not create a border

Posted by Alex Harui <ah...@adobe.com>.
Sometimes with this focus stuff, you may need a couple of callLaters
chained together.

On 10/10/13 7:49 AM, "mark goldin" <ma...@gmail.com> wrote:

>Actually I was to quick jumping to conclusion. The following code does the
>job but it's inconsistent.
>field.setFocus();
>field.focusManager.showFocus();
>
>Sometimes I see the border sometimes not. I tried using callLater, the
>same.
>
>
>On Wed, Oct 9, 2013 at 11:25 AM, Alex Harui <ah...@adobe.com> wrote:
>
>> If it works for you, then yes.
>> ________________________________________
>> From: mark goldin [markzolotoy@gmail.com]
>> Sent: Wednesday, October 09, 2013 7:30 AM
>> To: users
>> Subject: Re: setFocus does not create a border
>>
>> I've got this working for me:
>> field.drawFocus(true);
>>
>> Is it the same?
>>
>>
>> On Tue, Oct 8, 2013 at 5:41 PM, Alex Harui <ah...@adobe.com> wrote:
>>
>> > Try focusManager.showFocus()
>> > ________________________________________
>> > From: mark goldin [markzolotoy@gmail.com]
>> > Sent: Tuesday, October 08, 2013 12:24 PM
>> > To: users
>> > Subject: setFocus does not create a border
>> >
>> > I am setting up a focus over a control like this:
>> > control.setFocus();
>> >
>> > When I tab out of it the next control gets a focus meaning my first
>> control
>> > did have a focus. Unfortunately setFocus does not create a blue border
>> > around first control. Is that can be fixed?
>> >
>> > Thanks
>> >
>>


Re: setFocus does not create a border

Posted by mark goldin <ma...@gmail.com>.
Actually I was to quick jumping to conclusion. The following code does the
job but it's inconsistent.
field.setFocus();
field.focusManager.showFocus();

Sometimes I see the border sometimes not. I tried using callLater, the same.


On Wed, Oct 9, 2013 at 11:25 AM, Alex Harui <ah...@adobe.com> wrote:

> If it works for you, then yes.
> ________________________________________
> From: mark goldin [markzolotoy@gmail.com]
> Sent: Wednesday, October 09, 2013 7:30 AM
> To: users
> Subject: Re: setFocus does not create a border
>
> I've got this working for me:
> field.drawFocus(true);
>
> Is it the same?
>
>
> On Tue, Oct 8, 2013 at 5:41 PM, Alex Harui <ah...@adobe.com> wrote:
>
> > Try focusManager.showFocus()
> > ________________________________________
> > From: mark goldin [markzolotoy@gmail.com]
> > Sent: Tuesday, October 08, 2013 12:24 PM
> > To: users
> > Subject: setFocus does not create a border
> >
> > I am setting up a focus over a control like this:
> > control.setFocus();
> >
> > When I tab out of it the next control gets a focus meaning my first
> control
> > did have a focus. Unfortunately setFocus does not create a blue border
> > around first control. Is that can be fixed?
> >
> > Thanks
> >
>

RE: setFocus does not create a border

Posted by Alex Harui <ah...@adobe.com>.
If it works for you, then yes.
________________________________________
From: mark goldin [markzolotoy@gmail.com]
Sent: Wednesday, October 09, 2013 7:30 AM
To: users
Subject: Re: setFocus does not create a border

I've got this working for me:
field.drawFocus(true);

Is it the same?


On Tue, Oct 8, 2013 at 5:41 PM, Alex Harui <ah...@adobe.com> wrote:

> Try focusManager.showFocus()
> ________________________________________
> From: mark goldin [markzolotoy@gmail.com]
> Sent: Tuesday, October 08, 2013 12:24 PM
> To: users
> Subject: setFocus does not create a border
>
> I am setting up a focus over a control like this:
> control.setFocus();
>
> When I tab out of it the next control gets a focus meaning my first control
> did have a focus. Unfortunately setFocus does not create a blue border
> around first control. Is that can be fixed?
>
> Thanks
>

Re: setFocus does not create a border

Posted by mark goldin <ma...@gmail.com>.
I've got this working for me:
field.drawFocus(true);

Is it the same?


On Tue, Oct 8, 2013 at 5:41 PM, Alex Harui <ah...@adobe.com> wrote:

> Try focusManager.showFocus()
> ________________________________________
> From: mark goldin [markzolotoy@gmail.com]
> Sent: Tuesday, October 08, 2013 12:24 PM
> To: users
> Subject: setFocus does not create a border
>
> I am setting up a focus over a control like this:
> control.setFocus();
>
> When I tab out of it the next control gets a focus meaning my first control
> did have a focus. Unfortunately setFocus does not create a blue border
> around first control. Is that can be fixed?
>
> Thanks
>

RE: setFocus does not create a border

Posted by Alex Harui <ah...@adobe.com>.
Try focusManager.showFocus()
________________________________________
From: mark goldin [markzolotoy@gmail.com]
Sent: Tuesday, October 08, 2013 12:24 PM
To: users
Subject: setFocus does not create a border

I am setting up a focus over a control like this:
control.setFocus();

When I tab out of it the next control gets a focus meaning my first control
did have a focus. Unfortunately setFocus does not create a blue border
around first control. Is that can be fixed?

Thanks