Focus() problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Craig

    Focus() problem

    I am setting the focus to an edit box. However, although htis is working,
    when the focus goes to the edit box, any text inside the edit box needs to
    be selected, like when you manually tab to an edit box.

    With Focus(), the cursor moves to the box, but it doesn't select the text.

    Anyway to fix this ?


  • lallous

    #2
    Re: Focus() problem

    Hello,

    Do: theField.focus( );theField.sele ct();

    --
    Elias

    "Craig" <myspam@myaccou nt.com> wrote in message
    news:3fd48241$0 $14033$fa0fcedb @lovejoy.zen.co .uk...[color=blue]
    > I am setting the focus to an edit box. However, although htis is working,
    > when the focus goes to the edit box, any text inside the edit box needs to
    > be selected, like when you manually tab to an edit box.
    >
    > With Focus(), the cursor moves to the box, but it doesn't select the text.
    >
    > Anyway to fix this ?
    >
    >[/color]


    Comment

    • Craig

      #3
      Re: Focus() problem

      Thanks, Elias.
      Worked a charm!

      Craig
      "lallous" <lallous@lgwm.o rg> wrote in message
      news:br25q5$282 fea$1@ID-161723.news.uni-berlin.de...[color=blue]
      > Hello,
      >
      > Do: theField.focus( );theField.sele ct();
      >
      > --
      > Elias
      > http://lgwm.org/
      > "Craig" <myspam@myaccou nt.com> wrote in message
      > news:3fd48241$0 $14033$fa0fcedb @lovejoy.zen.co .uk...[color=green]
      > > I am setting the focus to an edit box. However, although htis is[/color][/color]
      working,[color=blue][color=green]
      > > when the focus goes to the edit box, any text inside the edit box needs[/color][/color]
      to[color=blue][color=green]
      > > be selected, like when you manually tab to an edit box.
      > >
      > > With Focus(), the cursor moves to the box, but it doesn't select the[/color][/color]
      text.[color=blue][color=green]
      > >
      > > Anyway to fix this ?
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...