Embedded objects in fields
Richard Gaskin
ambassador at fourthworld.com
Mon Jul 4 17:25:47 EDT 2005
>> WOW - I would love scrolling text fields with pictures!
>
> -- and buttons! (At the moment I'm doing this is a non-scrolling
> field inside a scrolling group, but aside from being tedious that has
> other disadvantages, such as the scroll-wheel not working right.)
To get scroll wheel support you can put a graphic behind the other
objects in the group sized to match the group's formattedHeigh and
formattedWidth, then add this to the group script:
on rawKeyDown k
get the vScroll of me
if k = 65308 then -- scroll wheel up
set the vScroll of me to (it + 70)
else if k = 65309 then -- scroll wheel down
set the vScroll of me to (it - 70)
else pass rawKeyDown
end rawKeyDown
I used 70 there because it matched the size of the objects being viewed
in my app; you can use any scroll increment that works for your needs.
--
Richard Gaskin
Fourth World Media Corporation
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list