[ANN] MobGUI themes
John Craig
john at splash21.com
Mon Jan 6 03:36:50 EST 2014
The problem is that you coded the original scrollbar to perform it's
task on a mouseUp (not continuously on an onScrollbarDrag), but you
coded the MG slider to perform the task continuously while it is being
dragged. Inside the 'viewtext' handler, you have a 'wait 5 ticks with
messages' which allows another slider message to fire before the routine
is complete. If you recode the MG slider to act the same way as the
original scrollbar (act on a mouseUp) then the script works as normal.
Here's a mouseUp handler for the MG slider;
on mouseUp
put the mgValue of group "Slider-1027" into tSliderValue
set the thumbPos of sb "ScrollbarTri" to round(tSliderValue, 0)
------------------- used below
# Calc Scale Ratio
put the height of grc "PolyComments" into tH
put the width of grc "PolyComments" into tW
put tH/tW into tR -- ratio
set the height of grc "PolyComments" to tSliderValue
------------------------- see above
put the height of grc "PolyComments" into tH
put tH/tR into tneWidth -- calculated new width
set the width of grc "PolyComments" to tneWidth
set the height of fld "Fview" to the height of grc "PolyComments"
set the width of fld "Fview" to the width of grc "PolyComments"
set the loc of fld "Fview" to the loc of grc "PolyComments"
send mouseUp to btn (the hilitedButton of grp "grpReflow") of grp
"grpReflow" -- reflow text
end mouseUp
:D
On 06/01/2014 02:41, Roger Eller wrote:
> My actual use of the MG Slider control (only as a test) is in this stack.
> Have a look if you'd like.
>
> https://www.dropbox.com/s/8elmst92b5njz1m/triangle_fields_forever.livecode
>
> I eliminated the frozen IDE by rounding pValue to an integer, but still
> isn't behaving like I want. Btw, can we have an option in MobGUI to show
> the value under the slider?
>
> ~Roger
>
>
>> On Sun, Jan 5, 2014 at 6:47 PM, John Craig <john at splash21.com> wrote:
>>
>>> Hi, Roger. I can reference and set the mgValue (not pValue) of sliders
>>> here and it's working as expected.
>>> I changed to pValue, but no crash - is this something you can replicate
>>> or do you have any other info to go on?
>>>
>>>
>>>
>>>
>>> On 05/01/2014 22:05, Roger Eller wrote:
>>>
>>>> The new themes look great! But I managed to freeze LiveCode in less
>>>> than a
>>>> minute.
>>>>
> _______________________________________________
> 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