scale widget

32 views
Skip to first unread message

hengre

unread,
Jan 26, 2021, 4:28:06 PM1/26/21
to dislin-users
Hello,
I am using scale widget to define the position of e.g a xz-plane for doing some calculations. I want to set the value of y with the slider or the arrows left and right. I got it working. After mouse left clicking the left or right arrow the value changes by the defined step, but is the mouse pointer still standing over the arrow buttons the value ich changing further and fast (wihle mouse button is not pressed). My code is:

   CALL SWGCLR (235/255d0, 195/255d0, 117/255d0, 'SCROLL')
   CALL SWGSTP (.1d0)
   CALL WGSCL  (ip1, 'y_min      --  mm  -->      y_max ', -1.d0, 2.d0, 0.0d0, 3, id_xz0y)
   CALL SWGCBK (id_xz0y, MYPLOT_xz)

I played around with CALL DOEVNT, but could not change the behaviour. Maybe I used the Doevnt not propperly.

How to manage the Subroutine MYPLOT_xz is only called when the left/right arrows are clicked or the slider is moved?

Thank you

Regards


slider.jpg

Helmut Michels

unread,
Jan 27, 2021, 3:39:14 AM1/27/21
to dislin-users
Hello Hengre,

I cannot reproduce the problem. Even not with the options below. For me, the value of the scroll bar
is only changed if I click the arrows, or the slider field. Do you have changed your mouse behavior in
the system settings for the mouse? Have you tried another mouse?

With best regards,

Helmut

hengre

unread,
Jan 27, 2021, 2:44:53 PM1/27/21
to dislin-users
Thank you Helmut,
I made the programm on my old Win7 PC and have tested it just now on a Win 10 Loptop and got the same result.
(Did you see my video from my second post scales widget_2 ?)
On the Win10 PC I have the feeling it happens when clicking the arrows in short sequence.
Pressing the mouse button first time - waiting waiting till the arrow butten is up again, then clicking again... in slow mode it worked alost as wanted.
But, if you click faster and the arrow button wasn't up at the second click, the same happens as described - if the mouse pointer is moves over the arrows  the slider moves fast without clicking.

Regards
Henning
Reply all
Reply to author
Forward
0 new messages