Results 1 to 2 of 2

Thread: VB6 (RC6) Slider-Widget with Auto-Vert/Horz-Switching

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jun 2013
    Posts
    5,618

    VB6 (RC6) Slider-Widget with Auto-Vert/Horz-Switching

    Just a simple Demo, which shows an efficient Slider-Control implementation.
    (about 70 Lines of code in cwSlider).

    Also included is a Demonstration for "visual inheritance" (of cwSlider in cwSliderFish)... don't ask...

    Here's a ScreenShot:


    And here the Demo-Code for this initial version:
    SliderWidget.zip

    Edit (a newer version v2 is available in the Link below):
    - fixed a few Rendering-glitches with higher Zoom-Factors
    - the cwSlider.cls is now able, to render the thumb from User-ImgResources as well (by setting a Widget.ImageKey)
    - placed a few more comments in the surrounding Demo-App
    SliderWidget_v2.zip



    Have fun,

    Olaf
    Last edited by Schmidt; Nov 27th, 2020 at 04:54 PM.

  2. #2
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,016

    Re: VB6 (RC6) Slider-Widget with Auto-Vert/Horz-Switching

    I made some changes, because your very good example, draw both fish and arrow:

    At cwSlidder:
    Code:
    Public NoArrow As Boolean
    In same class at W_Paint:
    Code:
    If Not NoArrow Then Cairo.Theme.DrawTo CC, W, thmTypeArrow, IIf(W.Focused, thmStateHovered, 0), xV - 6, 0, 13, 7, 0, thmDirectionDown
    At cwSliderFish, we place the S.NoArrow=True, so now we didn't get the arrow behind the image of fish (or any other)
    Code:
    Private Sub Class_Initialize()
      Set S = New cwSlider  'create a new (normal) cwSlider-instance
      S.NoArrow = True
      Set W = S.Widget 'now override our internal WidgetBase with it
    End Sub
    George

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width