Re: Segmented Control Widget

2020-11-09 Thread Terence Heaford via use-livecode
I will give this a try.

It’s a shame that widgets always seem to be incomplete in one way or another.

Thanks for your help.

All the best

Terry



> On 9 Nov 2020, at 16:52, Bob Sneidar via use-livecode 
>  wrote:
> 
> In my custom tabbed object group, I had to put transparent buttons over the 
> tabs

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Segmented Control Widget

2020-11-09 Thread Bob Sneidar via use-livecode
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 
>  wrote:
> 
> 
> 
>> On 5 Nov 2020, at 20:10, J. Landman Gay via use-livecode 
>>  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@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Segmented Control Widget

2020-11-07 Thread Terence Heaford via use-livecode



> On 5 Nov 2020, at 20:10, J. Landman Gay via use-livecode 
>  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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Segmented Control Widget

2020-11-06 Thread Terence Heaford via use-livecode
I can see the advantages of doing it yourself and intend trying both methods as 
suggested by yourself and Jaqueline.

I have noted when trying some of the widgets that they do seem to be rather 
incomplete.

All the best

Terry


> On 5 Nov 2020, at 22:43, Bob Sneidar via use-livecode 
>  wrote:
> 
> The segmented control is fairly limited. Most of the widgets are. The 
> properties you see are the properties you get. I did however, with a bit of 
> clever scripting, develop a tabbed object group that works as well or better 
> that the built in tabbed button. And for a bonus, it looks in Windows the 
> same as it loos on the Mac. Really, the Windows UI is really horrible for LC. 
> I just gotta say. It puts the Ugh in Ughly. 
> 
> Bob S
> 
> 
>> On Nov 5, 2020, at 12:10 PM, J. Landman Gay via use-livecode 
>>  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 | jac...@hyperactivesw.com
>> HyperActive Software   | http://www.hyperactivesw.com
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Segmented Control Widget

2020-11-06 Thread Terence Heaford via use-livecode
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 
>  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 | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Segmented Control Widget

2020-11-05 Thread Bob Sneidar via use-livecode
The segmented control is fairly limited. Most of the widgets are. The 
properties you see are the properties you get. I did however, with a bit of 
clever scripting, develop a tabbed object group that works as well or better 
that the built in tabbed button. And for a bonus, it looks in Windows the same 
as it loos on the Mac. Really, the Windows UI is really horrible for LC. I just 
gotta say. It puts the Ugh in Ughly. 

Bob S


> On Nov 5, 2020, at 12:10 PM, J. Landman Gay via use-livecode 
>  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 | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Segmented Control Widget

2020-11-05 Thread J. Landman Gay via use-livecode

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 | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Segmented Control widget mouseDown

2018-05-02 Thread Richmond Mathewson via use-livecode
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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Segmented Control widget mouseDown

2018-05-01 Thread prothero--- via use-livecode
I had the same experience as Andrew. I would love to see a mousedown and 
mouseup message sent to this widget. 

Bill

William Prothero
http://earthlearningsolutions.org

> On May 1, 2018, at 10:16 PM, 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@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode