One Rect For All specificaiton

Scott Rossi scott at tactilemedia.com
Mon Jan 25 17:16:54 EST 2016


If I understand what you're trying to do, I accommodate this by designing
groups to position themselves when the card is open, using preOpenControl
or openControl.  Simple example:

-- SCRIPT OF TAB BAR GROUP OR SIMILAR
on preOpenControl
   put rect of this card into theRect
   put item 4 of theRect - height of me into item 2 of theRect
   set rect of me to theRect
end preOpenControl

You might need to fiddle with the rect depending on the fullScreenMode you
use.

Otherwise you can run script on preOpenCard/openCard to position things
where you want.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 1/25/16, 12:49 PM, "use-livecode on behalf of Sannyasin
Brahmanathaswami" <use-livecode-bounces at lists.runrev.com on behalf of
brahma at hindu.org> wrote:

>I tried three methods which try to avoid "don¹t use clever code to
>position the tools.:
>
>but they all failed
>
>but resizeStack is not sent when opened on a different device/ratio (it
>would be cool if that were a feature!()
>
>
>on resizeStack x,y
>
>   set the bottom of group "utils" to y
>
>   set the bottom of group "bottomBleedGroup" to y
>
>end resizestack
>
>
>doesn¹t work
>
>
>This also does not work:
>
>
>on preOpenStack
>
>   if isMobile() then
>
>      Set the fullScreenMode of this stack to "ShowAll"
>
>   end if
>
>   put the rect of this card into tCardRect
>
>   set the bottom of group "utils" to item 4 of tCardRect
>
>   set the bottom of group "bottomBleedGroup" to  item 4 of tCardRect
>
>
>
>end preOpenStack
>
>
>This also does not work:
>
>
>on preOpenStack
>
>   if isMobile() then
>
>      Set the fullScreenMode of this stack to "ShowAll"
>
>         put the effective working ScreenRect into tScreenRect
>
>   end if
>
>
>   set the bottom of group "utils" to item 4 of tScreenRect
>
>   set the bottom of group "bottomBleedGroup" to  item 4 of tScreenRect
>
>
>
>end preOpenStack
>
>
>Those group stick to their original ³native² stack location even though
>the current device context offers more area below (or top or left and
>right)
>
>
>So, perhaps we need just a bit of ³clever code²  ?? Is the card script is
>a better location, since possibly preOpenStack is not yet informed as the
>screen context?






More information about the use-livecode mailing list