Segmented Control widget mouseDown

andrew at midwestcoastmedia.com andrew at midwestcoastmedia.com
Wed May 2 01:16:47 EDT 2018


(apologies, this was initially sent to the wrong email)

Is there any way to capture mouseDown/Up on a Segmented Control  
widget? hiliteChanged is the only message that is documented or shows  
up in the Script Editor and standard mouseDown/Up handlers aren't  
acknowledged. Am I missing something or does this need to be enabled  
first in LCB and then passed to LC?

I tried putting a mouseDown/Up on the widget and it doesn't trigger. I  
tried putting the widget in a group by itself (a trick I learned so I  
could put Effects on widgets) and applying the mouseDown/Up script to  
the group and it doesn't trigger. I add another object to that group  
and when I click on that other object the group script finally  
triggers, but not when clicking on the widget.

My problem is that I can't find a way to determine if the item of the  
Segmented Control that was clicked was already the current  
hilitedItem. I know I can toggle the hilite, but I just want to know  
if the current "active" item has been clicked again.

My goal is to replace 3 buttons that I use to sort a dataGrid by 3  
different filters. Currently I have the buttons scripted to act like a  
group of radio buttons (but they are standard buttons for easier  
skinning) and realize if they are the "active" button and toggle  
sorting by descending/ascending for that filter (the iconPresetName of  
a SVG widget is also toggled at this time to indicate the sort  
direction).

--Andrew Bell





More information about the use-livecode mailing list