FUpdown

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
HandleHWND (R) Handle des Control(nur lesen !)
UpperShort (R/W) Max. Range
LowerShort (R/W) Min. Range
CurposShort (R/W) Aktuelle Position
BuddyHWND (R/W) Handle des zuzuordnenden Edit Control.
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

 

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