You are not logged in.

hari

Beginner

  • "hari" is male
  • "hari" started this thread

Posts: 8

Date of registration: May 9th 2009

About me: Web developer by trade, and lover of Open Source Movement!

Location: Coimbatore,TamilNadu,India

Occupation: Web Developer

Hobbies: programming,bycycling,chess,drawing

  • Send private message

1

Friday, March 5th 2010, 5:46pm

Slider Problem

Slider problem

Giasone70

Beginner

Posts: 8

Date of registration: May 7th 2011

  • Send private message

2

Saturday, May 7th 2011, 9:55am

Slider Problems

Hi, Has anyone managed something to solve those problems about Slider Control?

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

3

Saturday, May 7th 2011, 10:59am

What is or was the problem?

Greetings

A1880

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

4

Monday, May 9th 2011, 1:42pm

Slide does not yet support special tick effects

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

This post has been edited 1 times, last edit by "A1880" (May 9th 2011, 1:53pm)


Rate this thread
WoltLab Burning Board