B4A Class HVSeekbar class - Customizable Horizontal and Vertical seekbars

Discussion in 'Additional libraries, classes and official updates' started by Ivan Aldaz, Oct 22, 2017.

  1. Ivan Aldaz

    Ivan Aldaz Member Licensed User

    Hi all. I needed a vertical seekbar for my app, and at first only found derez's seekbars, but they didn't fit the aesthetics of my app, so I decided to try it by myself, and began to work. Once I had almost ended this class I found mabool's ICS Like Horizontal and Vertical Seekbars, and really liked them, but the work was almost done and I had to finish it, so here it is.

    This class generates horizontal and vertical seekbars, in which you can customize the shape and colors (pressed and not pressed) of the slider, the background color and the width and colors in the two parts of the bar.

    You can also put negative values in Vmin, set "Visible" and "Enabled" properties.

    Example of usage:

    Code:
    barV1.Initialize(Me, panelSeeks, "barV1")

    'You can skip next three lines (SetColors, SetInitValues and/or SetShape), and default values will be set. 
    'The default values can be defined in the Sub DefaultValues (Class module)
    barV1.SetColors(Colors.Gray, Colors.red, Colors.blue, Colors.Gray, Colors.White)  'Normally, cursor_Pressed_Color = line_Color
    barV1.SetInitValues(-100300150'V min, V max, V init
    barV1.SetShape(barV1.cursorType_RECTANGLE, 15dip40dip8dip)

    barV1.ShowBar(
    5%x5%x10%x45%y, barV1.orientation_VERTICAL)
    Attached is a screenshot with the project examples, and an explanatory image about measurements, that perhaps saves time for someone trying to understand the code.

    Hope you find it useful
     

    Attached Files:

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice