textbox scrollbar in a user control.

Posted on 2014-08-03
Last Modified: 2014-08-03
Hi Experts,

I have a textbox in a user control.
How can I set the scrollbar property of the textbox in the user control dynamically to different value as required ?

Question by:LoGa1234567890
    LVL 22

    Accepted Solution

    Sounds like you may need to add a property to the user control to allow users of your control to set values, something like this:

        Public Property TextScrollBar() As System.Windows.Forms.ScrollBars
                Return TextBox1.ScrollBars
            End Get
            Set(value As System.Windows.Forms.ScrollBars)
                TextBox1.ScrollBars = value
            End Set
        End Property

    Open in new window


    Author Closing Comment

    Thanks rspahitz  !

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now