Selection In A Textbox

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

    Selection In A Textbox

    How can I turn the selection highlight off when I enter a textbox? I tried
    setting SelLength to 0 but it still selected 1 character. Can I change the color
    of the selection highlight?

    I want to turn the backcolor of a textbox to blue in the OnEnter event but the
    selection highlight interferes with what I want to do.

    Thanks!

    Mark


  • Wayne Morgan

    #2
    Re: Selection In A Textbox

    Try setting SelStart to 0. Also, this can be done globally at

    Tools|Options, Keyboard tab, Behavior entering field.

    --
    Wayne Morgan
    Microsoft Access MVP


    "Mark" <mmorrow@earthl ink.net> wrote in message
    news:T3CKb.2844 4$IM3.25082@new sread3.news.atl .earthlink.net. ..[color=blue]
    > How can I turn the selection highlight off when I enter a textbox? I tried
    > setting SelLength to 0 but it still selected 1 character. Can I change the[/color]
    color[color=blue]
    > of the selection highlight?
    >
    > I want to turn the backcolor of a textbox to blue in the OnEnter event but[/color]
    the[color=blue]
    > selection highlight interferes with what I want to do.
    >
    > Thanks!
    >
    > Mark
    >
    >[/color]


    Comment

    • Mark

      #3
      Re: Selection In A Textbox

      Wayne,

      Thanks for responding!

      Setting SelStart gives the same results - first character is highlighted in
      black and the cursor blinks.

      Any other suggestions?

      Mark


      "Wayne Morgan" <comprev_gothro ughthenewsgroup @hotmail.com> wrote in message
      news:qwCKb.5430 9$ud3.39041@new ssvr31.news.pro digy.com...[color=blue]
      > Try setting SelStart to 0. Also, this can be done globally at
      >
      > Tools|Options, Keyboard tab, Behavior entering field.
      >
      > --
      > Wayne Morgan
      > Microsoft Access MVP
      >
      >
      > "Mark" <mmorrow@earthl ink.net> wrote in message
      > news:T3CKb.2844 4$IM3.25082@new sread3.news.atl .earthlink.net. ..[color=green]
      > > How can I turn the selection highlight off when I enter a textbox? I tried
      > > setting SelLength to 0 but it still selected 1 character. Can I change the[/color]
      > color[color=green]
      > > of the selection highlight?
      > >
      > > I want to turn the backcolor of a textbox to blue in the OnEnter event but[/color]
      > the[color=green]
      > > selection highlight interferes with what I want to do.
      > >
      > > Thanks!
      > >
      > > Mark
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Wayne Morgan

        #4
        Re: Selection In A Textbox

        I just tried it again, it works. In the Enter event of the textbox I placed

        Me.NameOfTextbo x.SelStart = 0

        The cursor blinks just before the 1st character with no characters selected.
        Without it, the entire contents of the textbox are selected.

        --
        Wayne Morgan
        Microsoft Access MVP


        "Mark" <mmorrow@earthl ink.net> wrote in message
        news:DdFKb.1215 5$6B.1497@newsr ead1.news.atl.e arthlink.net...[color=blue]
        > Wayne,
        >
        > Thanks for responding!
        >
        > Setting SelStart gives the same results - first character is highlighted[/color]
        in[color=blue]
        > black and the cursor blinks.
        >
        > Any other suggestions?
        >
        > Mark
        >
        >
        > "Wayne Morgan" <comprev_gothro ughthenewsgroup @hotmail.com> wrote in[/color]
        message[color=blue]
        > news:qwCKb.5430 9$ud3.39041@new ssvr31.news.pro digy.com...[color=green]
        > > Try setting SelStart to 0. Also, this can be done globally at
        > >
        > > Tools|Options, Keyboard tab, Behavior entering field.
        > >
        > > --
        > > Wayne Morgan
        > > Microsoft Access MVP
        > >
        > >
        > > "Mark" <mmorrow@earthl ink.net> wrote in message
        > > news:T3CKb.2844 4$IM3.25082@new sread3.news.atl .earthlink.net. ..[color=darkred]
        > > > How can I turn the selection highlight off when I enter a textbox? I[/color][/color][/color]
        tried[color=blue][color=green][color=darkred]
        > > > setting SelLength to 0 but it still selected 1 character. Can I change[/color][/color][/color]
        the[color=blue][color=green]
        > > color[color=darkred]
        > > > of the selection highlight?
        > > >
        > > > I want to turn the backcolor of a textbox to blue in the OnEnter event[/color][/color][/color]
        but[color=blue][color=green]
        > > the[color=darkred]
        > > > selection highlight interferes with what I want to do.
        > > >
        > > > Thanks!
        > > >
        > > > Mark
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Mark

          #5
          Re: Selection In A Textbox

          Wayne,

          Thanks again!

          That's not quite what I wanted. I don't want the blinking cursor. I did find
          that if you right justify the field and set Me.NameOfTextbo x.SelStart = <Max
          Characters Expected In Textbox> that the cursor disappears.

          Mark



          "Wayne Morgan" <comprev_gothro ughthenewsgroup @hotmail.com> wrote in message
          news:KMFKb.5437 0$JK3.30903@new ssvr31.news.pro digy.com...[color=blue]
          > I just tried it again, it works. In the Enter event of the textbox I placed
          >
          > Me.NameOfTextbo x.SelStart = 0
          >
          > The cursor blinks just before the 1st character with no characters selected.
          > Without it, the entire contents of the textbox are selected.
          >
          > --
          > Wayne Morgan
          > Microsoft Access MVP
          >
          >
          > "Mark" <mmorrow@earthl ink.net> wrote in message
          > news:DdFKb.1215 5$6B.1497@newsr ead1.news.atl.e arthlink.net...[color=green]
          > > Wayne,
          > >
          > > Thanks for responding!
          > >
          > > Setting SelStart gives the same results - first character is highlighted[/color]
          > in[color=green]
          > > black and the cursor blinks.
          > >
          > > Any other suggestions?
          > >
          > > Mark
          > >
          > >
          > > "Wayne Morgan" <comprev_gothro ughthenewsgroup @hotmail.com> wrote in[/color]
          > message[color=green]
          > > news:qwCKb.5430 9$ud3.39041@new ssvr31.news.pro digy.com...[color=darkred]
          > > > Try setting SelStart to 0. Also, this can be done globally at
          > > >
          > > > Tools|Options, Keyboard tab, Behavior entering field.
          > > >
          > > > --
          > > > Wayne Morgan
          > > > Microsoft Access MVP
          > > >
          > > >
          > > > "Mark" <mmorrow@earthl ink.net> wrote in message
          > > > news:T3CKb.2844 4$IM3.25082@new sread3.news.atl .earthlink.net. ..
          > > > > How can I turn the selection highlight off when I enter a textbox? I[/color][/color]
          > tried[color=green][color=darkred]
          > > > > setting SelLength to 0 but it still selected 1 character. Can I change[/color][/color]
          > the[color=green][color=darkred]
          > > > color
          > > > > of the selection highlight?
          > > > >
          > > > > I want to turn the backcolor of a textbox to blue in the OnEnter event[/color][/color]
          > but[color=green][color=darkred]
          > > > the
          > > > > selection highlight interferes with what I want to do.
          > > > >
          > > > > Thanks!
          > > > >
          > > > > Mark
          > > > >
          > > > >
          > > >
          > > >[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          Working...