[ANN] pick wheel iOS7 style

Andrew Kluthe andrew at ctech.me
Mon Dec 9 19:57:14 EST 2013


Also, for anyone playing on the desktop I added these lines to make it
respond to the scroll wheel of the mouse on windows. I did end up disabling
the easeOut though.

on rawKeyDown pKey
   switch pKey
      case 65309
         ScrollOne "down"
         break
      case 65308
         ScrollOne "up"
         break
      case 65311
         ScrollOne "down"
         break
      case 65310
         ScrollOne "up"
         break
      default
         pass rawKeyDown
   end switch
end rawKeyDown

on ScrollOne pDirection
   put the effective textHeight of me into stextHeight
   put the number of lines of me into sNoOfLines
   put sNoOfLines / 2 into sRealNoOfLines
   switch pDirection
      case "up"
         if the cScrollLineNo of the owner of me   + 1 > sRealNoOfLines then
            setWheel 1
         else
            setWheel the cScrollLineNo of the owner of me   + 1
         end if
         break
      case "down"
          if the cScrollLineNo of the owner of me   - 1 < 1 then
            setWheel sRealNoOfLines
         else
            setWheel the cScrollLineNo of the owner of me   - 1
         end if
         break
   end switch
end ScrollOne


On Mon, Dec 9, 2013 at 6:45 PM, Scott Rossi <scott at tactilemedia.com> wrote:

> The "cool" part is that the native iOS7 style picker wheel is created for
> you.  It doesn't appear to be continuous.
>
> Regards,
>
> Scott Rossi
> Creative Director
> Tactile Media, UX/UI Design
>
>
>
>
> On 12/9/13 4:18 PM, "Roger Guay" <irog at mac.com> wrote:
>
> >Hi Scott,
> >
> >I¹m not sure I¹m doing it right, but what I see in the iOS simulator is
> >not a continuous wheel. This with a standard Option Menu control. Am I
> >missing something cool?
> >
> >Thanks,
> >
> >Roger
> >
> >
> >On Dec 9, 2013, at 2:40 PM, Scott Rossi <scott at tactilemedia.com> wrote:
> >
> >> Not sure if you've seen this, but in LC 6.5, when an option button is
> >> clicked it spawns a native iOS7 picker wheel as well.  I discovered this
> >> by accident. :-)
> >
> >
> >_______________________________________________
> >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
> >
>
>
>
> _______________________________________________
> 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
>



-- 
Regards,

Andrew Kluthe
andrew at ctech.me



More information about the use-livecode mailing list