Locked Add colour to scrollbar

  • Saturday, April 14, 2012 6:48 AM
     
     

    I have a scrollbar in a project, at the moment it is the basic, as a meter of an input. The larger the input the higher the bar goes up..   What I would like to do is instead of the bar, how can I replace the area lower than the bar with say a blue infill of the scrollbar?

    Thanks for looking at my post.

    PyrusBoy

All Replies

  • Sunday, April 15, 2012 10:43 AM
     
     Answered Has Code

    You can adjust the dimension of your ListBox control by code.
    See sample below:

    Public Class Form1
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Me.ListBox1.Width = 200
            Me.ListBox1.Height = 30
    
            Dim Color() As String = {"Red", "Blue", "Black", "Yellow", "Fuchsia"}
            For Each x In Color
                Me.ListBox1.Items.Add(x)
            Next
    
        End Sub
    End Class

    Otherwise other Controls allows alternative methods.
    Good luck.

    Note, a ble infill instead of the text "blue" might be a special and professional effect which can described in a later post but it does not decrease the control.


    Liebe Grüße Stefan | Cheers Stefan I'm using VB 2008 and VB 2010 Express Be a good forum member - mark posts that contain the answers to your questions or those that are helpful. c# in vb Translator: http://www.developerfusion.com/tools/convert/csharp-to-vb/