Replacing a Scrollbar control by a Segmented Control Widget
Posted: Sat Jan 21, 2017 9:12 pm
Hi, in the picture below I would like to replace the LittleArrows Scrollbar (Up & Down) by a Segmented Control with exactly the same functionality, Increasing and Decreasing a Label field called ValMeses.
Problems are:
- the Segmented Control doesn't react to several mouse clicks in the same segment
- it remains hilited even when I click the mouse outside the control
this is the code for the Scrollbar that works fine
and this is the code for the Segmented Control
What am I doing wrong? Many thanks...
Problems are:
- the Segmented Control doesn't react to several mouse clicks in the same segment
- it remains hilited even when I click the mouse outside the control
this is the code for the Scrollbar that works fine
Code: Select all
on scrollbarLineDec
if field ValMeses < 12 then
add 1 to field ValMeses
end if
end scrollbarLineDec
on scrollbarLineinc
if field ValMeses > 0 then
subtract 1 field ValMeses
end if
end scrollbarLineinc
Code: Select all
on hiliteChanged
put the hilitedItemNames of me into tHilited
if tHilited = "Plus" then
if field ValMeses < 12 then
add 1 to field ValMeses
end if
else
if field ValMeses > 0 then
subtract 1 field ValMeses
end if
end if
nd hiliteChanged