Segmented Control widget mouseDown
Richmond Mathewson
richmondmathewson at gmail.com
Wed May 2 04:03:47 EDT 2018
I was fiddling around with this at the weekend trying to work out how it
worked,
and was surprised by the lack of mouseDown/Up as well.
Richmond.
On 2/5/2018 8:16 am, Andrew Bell via use-livecode wrote:
> (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
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list