Segmented Control Widget

Bob Sneidar bobsneidar at iotecdigital.com
Mon Nov 9 11:52:41 EST 2020


I believe so. In my custom tabbed object group, I had to put transparent buttons over the tabs, then have a way to size and rearrange the buttons to match the size of the tabs, just so I could get it to respond to mouse messages and drag/drop operations. It's so ugly it's cute. Like a shar-pei. 

Bob S


> On Nov 7, 2020, at 24:39 , Terence Heaford via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> 
> 
>> On 5 Nov 2020, at 20:10, J. Landman Gay via use-livecode <use-livecode at lists.runrev.com> wrote:
>> 
>> 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.
> 
> 
> I placed the segmented control widget in a group and put a simple
> 
> on mouseEnter
> beep
> end mouseEnter
> 
> in the script of the group.
> 
> This did not implement a beep sound.
> I placed the same script in the segmented control and that did not make a beep either.
> 
> 
> I read the dictionary for mouseEnter and it does not apply to a group, I assume it also does not apply to the segmented control widget.
> 
> 
> I then created three standard buttons and placed those in a group.
> Placed the above script in the group.
> and each time the mouse entered a button it beeped. It did not beep upon entering the group.
> 
> Is all this the correct behaviour?
> 
> If it is then it is not possible to create your own tooltip for a segmented control widget unless there is some more fiddling that can be done.
> 
> It seems creating your own segmented control may be the only solution.
> 
> Any ideas
> 
> Thanks
> 
> Terry
> 
> 
> 
> _______________________________________________
> 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