The problem seems to be that the "TickStyle" property is shown correctly in the IDE but not in the running application.
A demo with three coupled sliders:
|
Jabaco Source
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
Option Explicit
Private bCalled As Boolean
Private Sub changeAll(myNo As Integer, v As Double)
If Not bCalled Then
bCalled = True ' prevent reentrant events
If myNo <> 1 Then Slider1.Value = v
If myNo <> 2 Then Slider2.Value = v
If myNo <> 3 Then Slider3.Value = v
bCalled = False
End If
End Sub
Public Sub Slider1_Change()
changeAll 1, Slider1.Value
End Sub
Public Sub Slider2_Change()
changeAll 2, Slider2.Value
End Sub
Public Sub Slider3_Change()
changeAll 3, Slider3.Value
End Sub
Public Sub Form_Load()
Slider1.PaintLabels = False
Slider1.SnapToTicks = False
Slider1.TickFrequency = 1
Slider1.TickStyle = sldBoth ' sldBottomRight
Slider1.Orientation = ccOrientationVertical
Slider1.Refresh
Slider2.PaintLabels = True
Slider2.SnapToTicks = True
Slider2.TickFrequency = 2
Slider2.TickStyle= sldTopLeft
Slider2.Orientation = ccOrientationHorizontal
Slider2.Refresh
Slider3.PaintLabels = True
Slider3.SnapToTicks = True
Slider3.TickFrequency = 2
Slider3.TickStyle = sldBottomRight
Slider3.Orientation = ccOrientationHorizontal
Slider3.Refresh
bCalled = False
End Sub
|
An implementation problem within the Jabaco framework:
See
here
A snippet from the Slider source:
|
Jabaco Source
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
Public Property Let TickStyle(v As TickStyleConstants)
If v = sldNoTicks Then
Call Base.setPaintTicks(False)
Else
Call Base.setPaintTicks(True)
End If
End Property
Public Property Get TickStyle() As TickStyleConstants
If Base.getPaintTicks() Then
TickStyle = sldTopLeft
Else
TickStyle = sldNoTicks
End If
End Property
|
It appears that the implementation only recognizes sldNoTicks and <> sldNoTicks
This is due to the fact that the JSlider as parent class of Slider does not know about
special ticks. It only knows about presence or absence of ticks.
Any volunteers for fixing this?
Greetings
A1880