FTrackbar

PropertyDatentyp(Read/Write)Hinweise
LeftInteger (R/W) Linke Position
TopInteger (R/W) Obere Position
WidthInteger (R/W) Weite
HeightInteger (R/W) Höhe
VisibleInteger (R/W) TRUE = sichtbar (voreingestellt) ; FALSE = nicht sichtbar
EnabledInteger (R/W) TRUE = aktiv (voreingestellt) ; FALSE = inaktiv
ColorUInteger (R/W) Hintergrundfarbe ; voreingestellt ist hellgrau
TumpColorUInteger (R/W) Farbe des verschiebbaren Button ( ist wirkungslos wenn DefTump=TRUE )
RilColorUInteger (R/W) Farbe der Rille
DefTumpInteger (R/W) =True Setzt den verschiebbaren Button auf Windows Standard Farbe und Form ( voreingestellt ist False)
TickInteger (R/W) =FALSE blendet die Scala aus ( voreingestellt ist TRUE)
TumpPosInteger (R/W) Setzt oder liest die aktuelle Thumpposition
OrientationInteger (R/W) 0 = horizontal, 1 = vertical ( voreingestellt ist horizontal)
BorderInteger (R/W) 0 = Ohne, 1 = einfacher Rahmen , 2 = Sunken ( voreingestellt ist 0 = ohne)
HandleHWND (R) Handle des Control(nur lesen !)
SUB ArgumenteHinweis
SUB Create (ByVal hParent As HWND,
ByVal x As Integer,ByVal y As Integer,ByVal w As Integer,ByVal h As Integer )
Handle des Elternfenster
Dimensionen x,y,Weite,Höhe
SUB Range (ByVal min As USHORT ,ByVal max As USHORT ) Setzt den Wertebereich
Event SUBArgumenteHinweis
onChange(ByVal nPos As Integer) nPos ist die aktuelle Position
onLButtondown(ByVal x As Short, ByVal y As Short) Wenn auf dem Control mit der linker Mousetaste geklickt wird
x und y ist dabei die Position des Mousezeigers
onRButtondown(ByVal x As Short, ByVal y As Short) Wenn auf dem Control mit der rechter Mousetaste geklickt wird
x und y ist dabei die Position des Mousezeigers

 

Beispiel :
    #Include "winFBgui.bi"


    Dim Shared As FForm form1
    Dim Shared As FPanel panel1,panel2
    Dim Shared As FEdit Edit1
    Dim Shared As FUpDown updn1
    Dim Shared As FTrackbar track1

    Sub updn1_Change(ByVal nPos As Integer)
    	track3.TumpPos = nPos
    End Sub

    Sub track1_Change(ByVal nPos As Integer)
    	updn1.CurPos = nPos
    End Sub

    '--------------------------------------------------------------------
    '                  Form und Control
    '--------------------------------------------------------------------

    form1.Create("Test 1",0,0,500,400)
    Form1.Center
    Form1.Color = &HEEFFBF

    ' Edit für UpDown
    Edit1.Style = Edit1.Style Or ES_CENTER Or ES_NUMBER
    Edit1.Create(form1.Handle,10,20,40,24)
    Edit1.Color = &HEEFFBF
    ' UpDown
    updn1.Create(form1.Handle,Edit1.Width + Edit1.Left ,20,36,24)
    updn1.Range(0,15 )
    updn1.Buddy = Edit1.Handle
    updn1.onChange = @updn1_Change


    track1.Create(form1.Handle,41,100,58,166)
    track1.Range(0 ,15)
    track1.Orientation = 1    ' vert.
    track1.Color = &HEEFFBF   ' Farbe des Control
    track1.TumpColor = &HFF   ' Farbe des Thump
    track1.RilColor = &H00FFFF' Farbe der Rille
    ' Panel als Label in der Trackbar'
    panel1.Create(track1.Handle,32,5,12,18)
    panel1.Caption = "0"
    panel1.Color = &HEEFFBF
    panel2.Create(track1.Handle,32,track1.height-22,18,18)
    panel2.Caption = "15"
    panel2.Color = &HEEFFBF

    '------ Show entält MessageLoop - muss immer am Ende sein ------------
    form1.Show
    ExitProcess(0)
    End
    

So siehts aus:

TrackUpdown