Questions about the focus of textbox

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

    Questions about the focus of textbox

    Hi all,

    I am trying to customize the text box to suit the
    practice of my app. And I am working about the focus
    behavior of text field.

    I have met the the following problem. When I set
    the "tabstop" property of a textbox to "False", the
    textbox does receive focus when user use the mouse to
    click. However, if I set the "Enable" property to false,
    the forecolor of the text will change to grey. Is there
    any method that I can prevent the textbox getting the
    focus neither by "Tab" key nor "Mouse" click?

    Thanks for your attention.

    Rgs,
    Albinas
  • Scott M.

    #2
    Re: Questions about the focus of textbox

    What about using a label with its border and backcolor changed so that it
    looks like a textbox?


    "Albinas" <anonymous@disc ussions.microso ft.com> wrote in message
    news:48b901c3a1 bc$d07d44e0$7d0 2280a@phx.gbl.. .[color=blue]
    > Hi all,
    >
    > I am trying to customize the text box to suit the
    > practice of my app. And I am working about the focus
    > behavior of text field.
    >
    > I have met the the following problem. When I set
    > the "tabstop" property of a textbox to "False", the
    > textbox does receive focus when user use the mouse to
    > click. However, if I set the "Enable" property to false,
    > the forecolor of the text will change to grey. Is there
    > any method that I can prevent the textbox getting the
    > focus neither by "Tab" key nor "Mouse" click?
    >
    > Thanks for your attention.
    >
    > Rgs,
    > Albinas[/color]


    Comment

    • Albinas

      #3
      Re: Questions about the focus of textbox

      Hi all,

      Thanks scott. But the field really needs input
      function under some situations. Actually, we are trying
      to divide the window form into read mode, insert mode,
      update mode and etc. And textbox in each mode will be
      given different setting of "ReadOnly", "TabStop", "Enable"
      and "Visible".

      For example, some fields will be editable during insert
      mode while some will be invisible (autorun number with
      user's defined format key) But that key will
      become "visible Only" when the form is under "browse mode".

      Your suggestion is actually my last sort of work-around.

      Is there any other suggestion?

      Rgs,
      Albinas


      [color=blue]
      >-----Original Message-----
      >What about using a label with its border and backcolor[/color]
      changed so that it[color=blue]
      >looks like a textbox?
      >
      >
      >"Albinas" <anonymous@disc ussions.microso ft.com> wrote in[/color]
      message[color=blue]
      >news:48b901c3a 1bc$d07d44e0$7d 02280a@phx.gbl. ..[color=green]
      >> Hi all,
      >>
      >> I am trying to customize the text box to suit the
      >> practice of my app. And I am working about the focus
      >> behavior of text field.
      >>
      >> I have met the the following problem. When I set
      >> the "tabstop" property of a textbox to "False", the
      >> textbox does receive focus when user use the mouse to
      >> click. However, if I set the "Enable" property to[/color][/color]
      false,[color=blue][color=green]
      >> the forecolor of the text will change to grey. Is there
      >> any method that I can prevent the textbox getting the
      >> focus neither by "Tab" key nor "Mouse" click?
      >>
      >> Thanks for your attention.
      >>
      >> Rgs,
      >> Albinas[/color]
      >
      >
      >.
      >[/color]

      Comment

      • Mark

        #4
        Re: Questions about the focus of textbox

        I believe that there is also a Locked property for a text
        box, this might help you although I am not sure about
        whether the control can receive focus.
        [color=blue]
        >-----Original Message-----
        >Hi all,
        >
        > Thanks scott. But the field really needs input
        >function under some situations. Actually, we are trying
        >to divide the window form into read mode, insert mode,
        >update mode and etc. And textbox in each mode will be
        >given different setting[/color]
        of "ReadOnly", "TabStop", "Enable"[color=blue]
        >and "Visible".
        >
        > For example, some fields will be editable during[/color]
        insert[color=blue]
        >mode while some will be invisible (autorun number with
        >user's defined format key) But that key will
        >become "visible Only" when the form is under "browse[/color]
        mode".[color=blue]
        >
        > Your suggestion is actually my last sort of work-[/color]
        around.[color=blue]
        >
        >Is there any other suggestion?
        >
        >Rgs,
        >Albinas
        >
        >
        >[color=green]
        >>-----Original Message-----
        >>What about using a label with its border and backcolor[/color]
        >changed so that it[color=green]
        >>looks like a textbox?
        >>
        >>
        >>"Albinas" <anonymous@disc ussions.microso ft.com> wrote in[/color]
        >message[color=green]
        >>news:48b901c3 a1bc$d07d44e0$7 d02280a@phx.gbl ...[color=darkred]
        >>> Hi all,
        >>>
        >>> I am trying to customize the text box to suit the
        >>> practice of my app. And I am working about the focus
        >>> behavior of text field.
        >>>
        >>> I have met the the following problem. When I set
        >>> the "tabstop" property of a textbox to "False", the
        >>> textbox does receive focus when user use the mouse to
        >>> click. However, if I set the "Enable" property to[/color][/color]
        >false,[color=green][color=darkred]
        >>> the forecolor of the text will change to grey. Is[/color][/color][/color]
        there[color=blue][color=green][color=darkred]
        >>> any method that I can prevent the textbox getting the
        >>> focus neither by "Tab" key nor "Mouse" click?
        >>>
        >>> Thanks for your attention.
        >>>
        >>> Rgs,
        >>> Albinas[/color]
        >>
        >>
        >>.
        >>[/color]
        >.
        >[/color]

        Comment

        • Scott M.

          #5
          Re: Questions about the focus of textbox

          Locked will still receive focus.

          You may want to consider using a label (as I described earlier) for your
          read mode and a textbox for your insert and update modes.


          "Mark" <anonymous@disc ussions.microso ft.com> wrote in message
          news:080b01c3a1 d0$a1e40290$a60 1280a@phx.gbl.. .[color=blue]
          > I believe that there is also a Locked property for a text
          > box, this might help you although I am not sure about
          > whether the control can receive focus.
          >[color=green]
          > >-----Original Message-----
          > >Hi all,
          > >
          > > Thanks scott. But the field really needs input
          > >function under some situations. Actually, we are trying
          > >to divide the window form into read mode, insert mode,
          > >update mode and etc. And textbox in each mode will be
          > >given different setting[/color]
          > of "ReadOnly", "TabStop", "Enable"[color=green]
          > >and "Visible".
          > >
          > > For example, some fields will be editable during[/color]
          > insert[color=green]
          > >mode while some will be invisible (autorun number with
          > >user's defined format key) But that key will
          > >become "visible Only" when the form is under "browse[/color]
          > mode".[color=green]
          > >
          > > Your suggestion is actually my last sort of work-[/color]
          > around.[color=green]
          > >
          > >Is there any other suggestion?
          > >
          > >Rgs,
          > >Albinas
          > >
          > >
          > >[color=darkred]
          > >>-----Original Message-----
          > >>What about using a label with its border and backcolor[/color]
          > >changed so that it[color=darkred]
          > >>looks like a textbox?
          > >>
          > >>
          > >>"Albinas" <anonymous@disc ussions.microso ft.com> wrote in[/color]
          > >message[color=darkred]
          > >>news:48b901c3 a1bc$d07d44e0$7 d02280a@phx.gbl ...
          > >>> Hi all,
          > >>>
          > >>> I am trying to customize the text box to suit the
          > >>> practice of my app. And I am working about the focus
          > >>> behavior of text field.
          > >>>
          > >>> I have met the the following problem. When I set
          > >>> the "tabstop" property of a textbox to "False", the
          > >>> textbox does receive focus when user use the mouse to
          > >>> click. However, if I set the "Enable" property to[/color]
          > >false,[color=darkred]
          > >>> the forecolor of the text will change to grey. Is[/color][/color]
          > there[color=green][color=darkred]
          > >>> any method that I can prevent the textbox getting the
          > >>> focus neither by "Tab" key nor "Mouse" click?
          > >>>
          > >>> Thanks for your attention.
          > >>>
          > >>> Rgs,
          > >>> Albinas
          > >>
          > >>
          > >>.
          > >>[/color]
          > >.
          > >[/color][/color]


          Comment

          Working...