Slider(LStdControl) how to get the arrows working?

Slider(LStdControl) how to get the arrows working?

Post by Klaus.Kloo » Mon, 28 Jun 2004 16:59:11


Hello

Ive created a slider using a LStdControl with 'control kind' 16. (CW8.3,
OSX10.3 and 9.2)
When I drag the slider, everything is working, the message is arriving
at my ListenToMessage.

But the arrows are not working. (clicking in the scoll-area does not
work too, but this is not so important)

Ive debugged a bit, and found out that the button-message (21,22) are
not defined in LStdControl::HotSpotResult. There is only code for
kControlIndicatorPart (dragging).

In the Contributed archive I could only find classes which do not rely
on LStdControl. I feel to be too near to the solution to use such a new
complex implementation ... :-)

Do I have to make my own class and overwrite HotSpotResult? Or am I
missing something.

Thanks for your help in advance
Greetings Klaus
 
 
 

Slider(LStdControl) how to get the arrows working?

Post by David Phil » Tue, 29 Jun 2004 05:36:05

In article <1gg19ka.21ftnwci6az0N% XXXX@XXXXX.COM >,



I don't know why you aren't using a LScollerView, which takes care of
these details for you, but you should at least read the source code in
LScollerView.cp and LScrollBar.cp to see what you are doing wrong.

 
 
 

Slider(LStdControl) how to get the arrows working?

Post by Klaus.Kloo » Fri, 02 Jul 2004 17:59:33


The is no view in my problem, so my thought was LScrollerView was too
complex.

I found a solution looking in the LScrollerView-source. Maybe someone
else is interested...

I had to add a Listener
mTheSlider->SetActionProc(sScrollerActionUPP);
where I can look for 'inPart' =20/21

It seems, that only the dragging of the scrollbar is handled
automatically, the other functions have to be coded.

Thanks and greetings
Klaus