frame container object

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
francof
Posts: 237
Joined: Fri Apr 11, 2014 10:51 am

frame container object

Post by francof » Thu Jun 26, 2014 6:29 pm

Hi all,
there is, in LC, something like a frame or rectangular resizable object?
able to contain inside other objects, such as buttons or fields, so as to make them invisible by changing only the property of the container?

strange request, is not it?
ciao
franco

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: frame container object

Post by Simon » Thu Jun 26, 2014 6:34 pm

Hi Franco,
Are you talking about grouping objects?
Just select all the objects you want and click on group up in the top menu bar.

You should also take a look at this learning resource;
http://www.hyperactivesw.com/revscriptc ... ences.html

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

francof
Posts: 237
Joined: Fri Apr 11, 2014 10:51 am

Re: frame container object

Post by francof » Fri Jun 27, 2014 2:24 pm

ciao Simon, thanks for your reply.
I also thought to group objects to display or hide. but the card is already crowded with objects, add other of them
would make it, in edit mode, unreadable. I do not like.
I also thought of adding a dedicated card, I should, however, store some data in global variables, to keep them when return to the previous card.

I can show you an example of what I want to do:


this is a visual basic form (the same of a LC card).
you can see some buttons, clicking one of them, on the form (card) will open a frame (a VB object, like a container)
form.jpg
this is the same card, but with the frame visible, where are visible other buttons and a datagrid.
when this frame will be closed, the card will return like in the first image
form1.jpg

Klaus
Posts: 14205
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: frame container object

Post by Klaus » Fri Jun 27, 2014 4:08 pm

Your screenshots show exactly what GROUPS are made for in Livecode :D
but the card is already crowded with objects, add other of them would make it, in edit mode, unreadable. I do not like.
It is was easy, everyone could do it! 8)

francof
Posts: 237
Joined: Fri Apr 11, 2014 10:51 am

Re: frame container object

Post by francof » Fri Jun 27, 2014 4:43 pm

Hi Klaus,
Klaus wrote:..........
but the card is already crowded with objects, add other of them would make it, in edit mode, unreadable. I do not like.
It is was easy, everyone could do it! 8)
I believe you :), but I understand nothing about how to do it :(
this my card
Immagine.jpg
I have to hide all objects and display other 7. the 3 radio buttons are already a group, is that a problem?

Klaus
Posts: 14205
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: frame container object

Post by Klaus » Fri Jun 27, 2014 5:09 pm

Buonasera Franco,
francof wrote:I have to hide all objects and display other 7. the 3 radio buttons are already a group, is that a problem?
not at all!

Just lock the screena nd everything will happen instantaneous!
...
lock screen
hide ...
hide ...
## hide everything you need
unlock screen
...

Same for showing all the objects again:
...
lock screen
show ...
show ...
unlock screen
...


Best

Klaus

francof
Posts: 237
Joined: Fri Apr 11, 2014 10:51 am

Re: frame container object

Post by francof » Fri Jun 27, 2014 5:45 pm

Buonasera to you, Klaus.

huch!....
your last post confuses me :? with lock and show screen. I must go to read something about that.

I have grouped all my objects on the card and hidden they. then I show the other group (with the new objects)

Code: Select all

on mouseUp
   set the visible of group "grpDomande" to false
   set the visible of group "grpRicerca" to true
end mouseUp
it is correct?
or must I hide and show each object individually? but so the benefit of grouping where is.....? :?

ciao
franco

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: frame container object

Post by sefrojones » Fri Jun 27, 2014 5:57 pm

Hi Francof,

I think you're on the right track. Groups will work for what you're doing. Check this out though:

Code: Select all

on mouseUp
   hide group "grpDomande" 
   show group "grpRicerca"
end mouseUp

a bit less to type. :)


--Sefro

edit: As far as your radio buttons group, there is no problem with having a group within a group.....

edit2: You also really should check out the scripting conferences that Simon linked to earlier, they are filled with great info. They are in the process of being updated, so just keep in mind that "Transcript" and "revolution" mean "Livecode" and you should get a lot out of them.....

francof
Posts: 237
Joined: Fri Apr 11, 2014 10:51 am

Re: frame container object

Post by francof » Fri Jun 27, 2014 6:10 pm

Hi Sefro,

yes, less to type, thanks for your confirmation, I'll go ahead on this way.

about lock/unlock screen
it will make the response time for the action on the card faster if the screen doesn't need to be updated till completion. it's so?

ciao
franco

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: frame container object

Post by sefrojones » Fri Jun 27, 2014 6:23 pm

francof wrote:
about lock/unlock screen
it will make the response time for the action on the card faster if the screen doesn't need to be updated till completion. it's so?

I believe this is the case. It also will make the transitions more smooth if you have several groups being hidden/shown at the same time. locking the screen will make them all appear to hide/show at the same time. It is also handy for visual effects.

Code: Select all

on mouseUp
lock screen for visual effect
   hide group "grpDomande" 
   show group "grpRicerca"
unlock screen with visual effect dissolve
end mouseUp
8)

--Sefro

Klaus
Posts: 14205
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: frame container object

Post by Klaus » Fri Jun 27, 2014 6:32 pm

francof wrote:about lock/unlock screen
it will make the response time for the action on the card faster if the screen doesn't need to be updated till completion. it's so?
ESATTO! :D

francof
Posts: 237
Joined: Fri Apr 11, 2014 10:51 am

Re: frame container object

Post by francof » Sat Jun 28, 2014 9:05 am

@Sefro, I tried your last code..... :)
@Klaus, no more beers: una pizza?

just one thing, about grouped objects, to show the script of a grouped object it's impossible by right-click on object itself, it can be done only by the application browser or there is some other way?


thanks both.
ciao
franco

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: frame container object

Post by jmburnod » Sat Jun 28, 2014 2:29 pm

Ciao Franco,
to show the script of a grouped object it's impossible by right-click on object itself, it can be done only by the application browser or there is some other way?
I understood that:

if the selectGroupedControl of a group is true AND btn "Select grouped" of the toolbar = true a right click works for the clicked control.
Just set the hilite of btn "Select grouped" of the toolbar to false and you can edit the group script with a right-clic

Best regards
Jean-Marc
https://alternatic.ch

francof
Posts: 237
Joined: Fri Apr 11, 2014 10:51 am

Re: frame container object

Post by francof » Sat Jun 28, 2014 5:48 pm

bonsoir Jean-Marc,
jmburnod wrote:Ciao Franco,
...............
I understood that:

if the selectGroupedControl of a group is true AND btn "Select grouped" of the toolbar = true a right click works for the clicked control.
Just set the hilite of btn "Select grouped" of the toolbar to false and you can edit the group script with a right-clic

Best regards
Jean-Marc
I belive so, I tried. clicking on "Select grouped" of the toolbar, with the group selected, release all the objects by the group. and it's possible access to the single object script by right-click on it.
then, click again on "Select grouped" of the toolbar, made the group again on, and the rigth-click on an object open the script of the whole group.

ciao
franco

Post Reply