Controlling Textbox Scrollbars with a text find operation

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

    Controlling Textbox Scrollbars with a text find operation

    Hi

    I have a teeny problem that I cannot solve.

    I load HTML Source into a textbox and have a "find' button that
    searches through the text using the Instr Function, and highlights the
    result using the Selectionlength and Selectionstart properties.

    This is working perfectly, however if the source does not fit in the
    textbox, I sometimes have to manually scroll down to see the
    highlighted selection.

    It there a way to make the textbox automatically scroll down to make
    the highlighted selection visible?

    I'm using VB.net on Visual Studio 2005


    thanks for the help :D

  • Lit

    #2
    Re: Controlling Textbox Scrollbars with a text find operation

    I would like to welcome you to the .NET jungle.

    I find Google and news groups to be the best. You are in the right place.

    You need several books, none are or can be complete and perfect.
    I got 10s of books already and not enough. you might need 10s every 6
    months.

    do not get discouraged by this just start and never quit.


    "plonk" <plonk@orcon.ne t.nzwrote in message
    news:1182382460 .192625.101320@ d30g2000prg.goo glegroups.com.. .
    Hi
    >
    I have a teeny problem that I cannot solve.
    >
    I load HTML Source into a textbox and have a "find' button that
    searches through the text using the Instr Function, and highlights the
    result using the Selectionlength and Selectionstart properties.
    >
    This is working perfectly, however if the source does not fit in the
    textbox, I sometimes have to manually scroll down to see the
    highlighted selection.
    >
    It there a way to make the textbox automatically scroll down to make
    the highlighted selection visible?
    >
    I'm using VB.net on Visual Studio 2005
    >
    >
    thanks for the help :D
    >

    Comment

    • Lit

      #3
      Re: Controlling Textbox Scrollbars with a text find operation

      Sorry the wrong post.....


      "Lit" <sql_agentman@h otmail.comwrote in message
      news:OZcaaf5sHH A.4232@TK2MSFTN GP05.phx.gbl...
      >I would like to welcome you to the .NET jungle.
      >
      I find Google and news groups to be the best. You are in the right place.
      >
      You need several books, none are or can be complete and perfect.
      I got 10s of books already and not enough. you might need 10s every 6
      months.
      >
      do not get discouraged by this just start and never quit.
      >
      >
      "plonk" <plonk@orcon.ne t.nzwrote in message
      news:1182382460 .192625.101320@ d30g2000prg.goo glegroups.com.. .
      >Hi
      >>
      >I have a teeny problem that I cannot solve.
      >>
      >I load HTML Source into a textbox and have a "find' button that
      >searches through the text using the Instr Function, and highlights the
      >result using the Selectionlength and Selectionstart properties.
      >>
      >This is working perfectly, however if the source does not fit in the
      >textbox, I sometimes have to manually scroll down to see the
      >highlighted selection.
      >>
      >It there a way to make the textbox automatically scroll down to make
      >the highlighted selection visible?
      >>
      >I'm using VB.net on Visual Studio 2005
      >>
      >>
      >thanks for the help :D
      >>
      >
      >

      Comment

      • plonk

        #4
        Re: Controlling Textbox Scrollbars with a text find operation

        On Jun 21, 12:05 pm, "Lit" <sql_agent...@h otmail.comwrote :
        I would like to welcome you to the .NET jungle.
        >
        I find Google and news groups to be the best. You are in the right place.
        >
        You need several books, none are or can be complete and perfect.
        I got 10s of books already and not enough. you might need 10s every 6
        months.
        >
        do not get discouraged by this just start and never quit.
        >
        "plonk" <p...@orcon.net .nzwrote in message
        >
        news:1182382460 .192625.101320@ d30g2000prg.goo glegroups.com.. .
        >
        >
        >
        Hi
        >
        I have a teeny problem that I cannot solve.
        >
        I load HTML Source into a textbox and have a "find' button that
        searches through the text using the Instr Function, and highlights the
        result using the Selectionlength and Selectionstart properties.
        >
        This is working perfectly, however if the source does not fit in the
        textbox, I sometimes have to manually scroll down to see the
        highlighted selection.
        >
        It there a way to make the textbox automatically scroll down to make
        the highlighted selection visible?
        >
        I'm using VB.net on Visual Studio 2005
        >
        thanks for the help :D- Hide quoted text -
        >
        - Show quoted text -
        Nevermind. I figured it out...

        the Method I was looking for was ScrollToCaret.

        Comment

        Working...