Segmented Control Widget

Terence Heaford theaford at btinternet.com
Fri Nov 6 11:11:47 EST 2020


Thanks for your suggestion will give it a try.

All the best

Terry

> On 5 Nov 2020, at 20:10, J. Landman Gay via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> On 11/5/20 1:47 AM, Terence Heaford via use-livecode wrote:
>> I have been messing about with the Segmented Control Widget and have been trying to apply a tooltip.
>> I noted that the tooltip can only be applied to the whole control, it does not appear possible to have a tooltip for each segment.
>> Is this possible and if so could someone please advise.
> 
> I've done this with a custom control group, it should work with a widget too. Calculate the rectangles (or at least the left and right edges) of each segment and in a mouseEnter handler compare the mouseLoc to the rectangles to see which one it's in. Then set the tooltip to the appropriate string. You can also add a mouseMove handler to do the same thing if you want to change tooltips as the mouseLoc changes inside the widget.
> 
> If the updated tooltip doesn't display reliably, set the tooltip to empty, wait a millisecond or so, and then set it to the new string.
> 
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> 
> _______________________________________________
> 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