Card of different sizes

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
AlessioForconi
Posts: 90
Joined: Sun Feb 15, 2015 2:51 pm

Card of different sizes

Post by AlessioForconi » Thu Feb 18, 2016 10:43 pm

Hello,
let's see if I understand correctly :)

After doing several tests I think I have figured out that they can not create two different sized card in the same stack, at least I did not succeed, right?
Wanting to open a second card of different size from the main card at run time I must create in a different stack to be included in the program and called for this purpose, right?

Admitting that he is right, but I'm wrong, can you give me some more precise indication about?

Thank you.

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Card of different sizes

Post by Klaus » Thu Feb 18, 2016 11:12 pm

Buonasera Alessio,

stacksize = cardsize!

But you can always change the size of your cards "on preopencard",
no need for an extra stack. :D


Best

Klaus

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Card of different sizes

Post by dunbarx » Thu Feb 18, 2016 11:16 pm

Hi.

Yes and no.

You cannot have two different sized cards in the same stack at the same time, but that hardly matters, since you can only see one card at one time.

You can change the card (stack) size whenever you wish. For example, you may have card 1 set to a certain rect. If you navigate to card 2, you can change that rect to anything at all. The user will see these changes as somewhat abrupt.

So if what you are really asking is if you can have two differently sized cards OPEN at the same time, one on top of or perhaps next to another, then you need two stacks (or a substack). This is commonly done when a palette is required to float above a stack; that palette is just another stack, and of course is usually much smaller.

Craig Newman

FredBeck
Posts: 77
Joined: Fri Nov 01, 2013 3:07 pm
Location: Paris
Contact:

Re: Card of different sizes

Post by FredBeck » Fri Feb 19, 2016 12:22 am

Oh the answer is so much simpler :mrgreen:
Look up for revChangeWindowSize in the dictionary!
Cheers,
Fred

AlessioForconi
Posts: 90
Joined: Sun Feb 15, 2015 2:51 pm

Re: Card of different sizes

Post by AlessioForconi » Fri Feb 19, 2016 12:27 am

Klaus wrote:Buonasera Alessio,

stacksize = cardsize!

But you can always change the size of your cards "on preopencard",
no need for an extra stack. :D


Best

Klaus
Guten abend Klaus,

I realized that you could do something similar but in this way it messes up the layout of the main card ...

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Card of different sizes

Post by dunbarx » Fri Feb 19, 2016 1:05 am

Hi.
ut in this way it messes up the layout of the main card ...
In what way? The controls on the card do not change or shift. It is true that if you make the card window smaller, you may orphan certain controls off screen. That can be managed, of course, but should not be a surprise.

Craig

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Re: Card of different sizes

Post by quailcreek » Fri Feb 19, 2016 1:47 am

AlessioForconi,
For what purpose do you want to have a card of a different size? Seems that a substack would do what you want.
Tom
MacBook Pro OS Mojave 10.14

AlessioForconi
Posts: 90
Joined: Sun Feb 15, 2015 2:51 pm

Re: Card of different sizes

Post by AlessioForconi » Fri Feb 19, 2016 9:25 am

quailcreek wrote:AlessioForconi,
For what purpose do you want to have a card of a different size? Seems that a substack would do what you want.
What I want to do is to open a card that will be used to enter search criteria for a query.
It will be open and will serve as a modal that has minimum dimensions and necessary that for sure are lower than those of the main card.

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Card of different sizes

Post by Klaus » Fri Feb 19, 2016 9:26 am

Buongiorno Alessio,
AlessioForconi wrote:
Klaus wrote:But you can always change the size of your cards "on preopencard",
... but in this way it messes up the layout of the main card ...
well, not really... :D
Also your MAIN card can have a "preopencard" scripts which fixes the inconveniences your are thinking of!


Best

Klaus

AlessioForconi
Posts: 90
Joined: Sun Feb 15, 2015 2:51 pm

Re: Card of different sizes

Post by AlessioForconi » Fri Feb 19, 2016 9:39 am

Klaus wrote:Buongiorno Alessio,
AlessioForconi wrote:
Klaus wrote:But you can always change the size of your cards "on preopencard",
... but in this way it messes up the layout of the main card ...
well, not really... :D
Also your MAIN card can have a "preopencard" scripts which fixes the inconveniences your are thinking of!


Best

Klaus
Hallo Klaus,

I imagine you can do in this way, but there is complicated everything having to manage the re-design of the main card?
If I understand correctly what you mean ...

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Card of different sizes

Post by dunbarx » Fri Feb 19, 2016 2:59 pm

Hi.
What I want to do is to open a card that will be used to enter search criteria for a query.
It sounds to me like this search card is a substack that floats above the main stack. Its style is up to you. And that means, simply, that two different cards are open at the same time. And that means that two different stacks are open at the same time. The size of each is no longer the issue, only that two are open simultaneously.

How this search stack is opened and managed is simple as well. Write back if you need suggestions...

Craig

AlessioForconi
Posts: 90
Joined: Sun Feb 15, 2015 2:51 pm

Re: Card of different sizes

Post by AlessioForconi » Fri Feb 19, 2016 10:51 pm

dunbarx wrote:Hi.
What I want to do is to open a card that will be used to enter search criteria for a query.
It sounds to me like this search card is a substack that floats above the main stack. Its style is up to you. And that means, simply, that two different cards are open at the same time. And that means that two different stacks are open at the same time. The size of each is no longer the issue, only that two are open simultaneously.

How this search stack is opened and managed is simple as well. Write back if you need suggestions...

Craig
Hi Craig,

I'm not sure I fully understood what you mean but I gladly accept your offer of suggestions ... :lol:

Thank you

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Re: Card of different sizes

Post by quailcreek » Fri Feb 19, 2016 11:40 pm

Hi AlessioForconi,
This should get you started. Look up modal and sheet in the dictionary.
Attachments
MyMainStack.zip
(960 Bytes) Downloaded 205 times
Tom
MacBook Pro OS Mojave 10.14

AlessioForconi
Posts: 90
Joined: Sun Feb 15, 2015 2:51 pm

Re: Card of different sizes

Post by AlessioForconi » Sat Feb 20, 2016 8:23 am

quailcreek wrote:Hi AlessioForconi,
This should get you started. Look up modal and sheet in the dictionary.
Thank you Tom, now studying...

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”