I wish ...

dunbarx at aol.com dunbarx at aol.com
Thu Jun 11 22:30:34 EDT 2015


All good stuff. You might post this into the "Feature Requests" section of the forums.


But because a relatively straightforward set of handlers and functions would do all that you ask for, including emulating the "relative" gadget you mentioned, it is not likely that the crew in Scotland will see this as either exciting or necessary.


But why not roll your own? It would be fun, and then you could share it with the world.


Craig Newman



-----Original Message-----
From: Scott Rossi <scott at tactilemedia.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Thu, Jun 11, 2015 8:09 pm
Subject: Re: I wish ...


If I understand what you're proposing, it should be fairly straightforward to
create custom properties that you can set for the objects within the group (or
perhaps as a behavior of the group) such as "relativeTop," and have that setProp
handler calculate whatever offsets you want.

Regards,

Scott
Rossi
Creative Director
Tactile Media UX/UI Design

> On Jun 11, 2015, at
4:27 PM, Paul Dupuis <paul at researchware.com> wrote:
> 
> Folks,
> 
> Thanks
for the tips, but I know how to position objects exactly where I
> want in a
scrolling group
> 
> My "venting" was that IF you are thinking about the
layout in terms of
> offsets from the top left of the group, you are forever
adding the top
> or left to your object positions
> 
> If my group is at
50,50 (top left) and has margins of 0 and I want an
> object position inside
the group at 40 pixel in from the left of the
> group and 40 pixels down from
the top of the group, I can't set the
> topLeft of the object to 40,40 I have
to do math like:
> 
> set the top of btn X to the top of the owner of btn x +
40
> set the left of btn x to the left of the owner of btn x+40
> 
> OR
explicitly as
> 
> set the top of btn X to the top of group Y + 40
> set the
left of btn x to the left of group Y +40
> 
> OR very explicitly as
> 
> set
the topLeft of btn X to 90,90
> 
> 
> Wouldn't it be more convenient to be
able to do something like
> 
> set the relative top of btn X to 40 -- and have
LiveCode see the keyword
> "relative" and position it at 40 pix down from the
top of it's owner?
> 
> And have "relative" be independent of the current
scroll. So in the same
> example if the group is current scrolled down 200
pixels and button
> who's original top was 40 (relative to the top of the group
or 90 in
> card coordinates) is now at -110 in card coordinates. If you
create
> another object to position, you have to factor in the current scroll
as
> well. If you could specify "relative", the engine would account for the
>
scroll for you.
> 
> The "relative" keyword would always be applicable for any
object below a
> stack, since even for a single button on a card, the button's
owner is
> the card and "relative top" is the same as "top" since a card
topLeft is
> 0,0 by definition.
> 
> 
> 
>> On 6/11/2015 6:52 PM, Mike
Bonner wrote:
>> If you want to get the size of the group including stuff
outside the
>> visible area, look at the formattedheight the formattedwidth or
go directly
>> to the formattedrect and use that.
>> 
>> On Thu, Jun 11, 2015
at 3:15 PM, Bob Sneidar <bobsneidar at iotecdigital.com>
>> wrote:
>> 
>>> Seems
like you could write a handler that could do it. The owner is what
>>> you want
to look at in the dictionary. The owner of an object is the group
>>> it is
in.
>>> 
>>> Bob S
>>> 
>>> 
>>>> On Jun 11, 2015, at 09:00 , Paul Dupuis
<paul at researchware.com> wrote:
>>>> 
>>>> ... that LiveCode had a way you
could set any and all the coordinates
>>>> (loc, rect, top, bottom, left,
right, topLeft, topRight, bottomLeft,
>>>> bottomRight) of an object inside a
group RELATIVE to the group (AND
>>>> independent of the group's scroll) - like
the relativePoints property of
>>>> a polygon graphic!
>>>> 
>>>> That would
make arranging complex layouts of objects in a scrolling
>>>> group SO MUCH
easier!
>>>> 
>>>> _______________________________________________
>>>>
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
>>> 
>>
_______________________________________________
>> 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

_______________________________________________
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