Quantcast

Changing a group visible boundaries by script

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Changing a group visible boundaries by script

Mark Talluto via use-livecode
Hi All,

How could I resize the visible boundary of a group
(with many controls) to show only the rectangle of
the clicked control?

For example, in a new stack create 3 or 4 controls
(buttons, fields, images or graphics) and group them.

Using the pointer tool change the size of the visible
boundary of this group to show only a single control
of the group (without deleting the others controls).
All invisible controls are inside the group but outside
the visible boundary of this group.

How could I produce the same result by scripting?
I hace tried all possible combinations that I am
aware, but still could not produce the result that
I am looking for. The group content moves itself
when I change the boundary.

Thanks in advance!

Al
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Changing a group visible boundaries by script

dunbarx
Hi.

Untested, but something like:

set the rect of grp "yourGroup" to the rect of control "yourControlToShrinkTo"

Craig Newman
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Changing a group visible boundaries by script

Mark Talluto via use-livecode
When you shrink the group, it does indeed move things around, so you'll
need to do the math to adjust the vscroll and hscroll.  Something like
this..

*set* the hscroll of me to the hscroll of me -(the left of me - the left of
the target )

*set* the vscroll of me to the vscroll of me -( the top of me - the top of
the target)

On Sun, Mar 19, 2017 at 6:43 PM, dunbarx via use-livecode <
[hidden email]> wrote:

> Hi.
>
> Untested, but something like:
>
> set the rect of grp "yourGroup" to the rect of control
> "yourControlToShrinkTo"
>
> Craig Newman
>
>
>
> --
> View this message in context: http://runtime-revolution.
> 278305.n4.nabble.com/Changing-a-group-visible-boundaries-by-
> script-tp4713184p4713186.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Changing a group visible boundaries by script

Mark Talluto via use-livecode
In reply to this post by Mark Talluto via use-livecode
On 3/19/17 7:23 PM, Alejandro Tejada via use-livecode wrote:
> How could I resize the visible boundary of a group
> (with many controls) to show only the rectangle of
> the clicked control?

Try setting the group's boundingRect to the rect of the control, then
setting the rect of the group.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...