Prevent window resizing

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

Prevent window resizing

Post by bjb007 » Sun Feb 17, 2008 8:33 am

I don't want the window of my prog to be resizable.
I've tried all the options I can find in the docs but
none of them make any difference.
I put this on the (only) stack card script...

set the minWidth of the defaultStack to 832
set the maxWidth of the defaultStack to 832
set the minHeight of the defaultStack to 398
set the maxHeight of the defaultStack to 398
--set the resizable of the defaultStack to false

The "set the resizable...." by itself doesn't do anything.

Any help appreciated.

Win XP Pro
Life is just a bowl of cherries.

Josh
Posts: 46
Joined: Sat Jan 12, 2008 6:42 am

I use palette or modal

Post by Josh » Sun Feb 17, 2008 9:48 am

for example:

modal the defaultstack

or

palette this stack

as two options

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sun Feb 17, 2008 10:43 am

bjb007,

Why do you use "defaultstack"? The syntax

set the resizable of this stack to false

should be correct. (Without the two dashes you have in front of it). When you execute this, you should see a quick flash of the window. What else do you expect to happen when this command executes?

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

Prevent window resizing

Post by bjb007 » Sun Feb 17, 2008 10:55 am

Mark

Why do you use "defaultstack"?
Because that's what the Dictionary has under "maxWidth".

"set the resizable of this stack to false"
doesn't work - the two dashes make it a comment
since the other four lines have no effect when
"resizable" is used...according to the docs.
So I tried it then commented it out when it didn't work.

A quick flash of the window? No, I want my app to run
and the size of the window (stack?) to be non-resizable
as in "set the resizable of this stack to false".

Perhaps it only works in a standalone? Haven't tried
it.
Life is just a bowl of cherries.

paul_gr
Posts: 319
Joined: Fri Dec 08, 2006 7:38 pm
Location: Blenheim, New Zealand

Post by paul_gr » Sun Feb 17, 2008 11:18 am

After setting the size manually, go to stack properties >> size and position >> uncheck "resizable" checkbox.
Just a suggestion -- try not to bite.

Paul (another grumpy old man)

bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

Making window unresizable

Post by bjb007 » Sun Feb 17, 2008 11:38 am

G'day Kiwi Paul

All the options on the "Size & Position" tab are
dimmed -- unavailable. Except for the "Resize"
checkbox.

Is this another instance of "Murpheys Law".

Bite? Only when I'm bitten.
Life is just a bowl of cherries.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sun Feb 17, 2008 11:46 am

Dear bjb007,

Are you sure that you opened the stack inspector and not an inspector for multiple objects?

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

Making window unresizable

Post by bjb007 » Sun Feb 17, 2008 12:05 pm

Mark and others.

Second time today that this has happened.

It's working now. I didn't change any settings
or code. (Yes, that's what they all say, isn't it?)

Well, I did check and uncheck the resize box
in the Property Inspector so who knows.

Guess it is Murpheys Law. Either that or the
Bug Fairy has got it in for me.
Life is just a bowl of cherries.

bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

Prevent window resizing

Post by bjb007 » Sun Feb 17, 2008 10:38 pm

The answer is....

The Card Property Inspector is the second
item on right-click popup.

The Stack Property Inspector is the fifth
item.

As the Card and the Stack are the same size
and I don't really understand the difference
(or even why there are Cards and Stacks)
when I thought I was preventing the Stack
(window) being resized I was only preventing
the Card (whatever that is) being resized.

OTOH I do know the difference between a
deck of cards and a stack of books.
But that doesn't really help, does it?
Life is just a bowl of cherries.

paul_gr
Posts: 319
Joined: Fri Dec 08, 2006 7:38 pm
Location: Blenheim, New Zealand

Post by paul_gr » Sun Feb 17, 2008 11:51 pm

Try this::
A double click on a card will bring up the card property inspector.
One more click on the card will bring up the stack property inspector.

cheers
Paul

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Prevent window resizing

Post by malte » Mon Feb 18, 2008 12:59 am

bjb007 wrote:
OTOH I do know the difference between a
deck of cards and a stack of books.
But that doesn't really help, does it?
Hi bjb007,

I must admit it is hard to get when you are starting with Rev, especially if you are used to more traditionally programming languages.

This is an exerpt of the free eBook I wrote a while back, which is available here: http://derbrill.de/developers.php?lang=en
Everytime you start a Revolution session, you start with a stack. Every window you see in a Revolution application is a stack. If you choose:

File->New mainstack

from the menubar you create a new project you are working with. If you create a new stack it looks like an empty system window. But actually it is not really empty as a newly created stack already contains a card.
You can think of a Revolution stack as a stack of playing cards.

A stack can contain one or more cards. It is the place that holds your content. Every card can have a different appearance. You can easily switch between multiple layouts. Cards can be viewed in different order, as selected by the user. Only one card at the time is being displayed. If you create a new card it covers the previous content. Each time you create a stack it already has one card in it. Once you have created a stack window, you can start arranging buttons, textfields, images, audio/video players, scrollbars and graphics on the current card. These objects are called controls. You can easily rearrange controls by dragging them around and resizing them. You can group controls together to make them work as a set. A set of controls is called a group. You can reuse groups on different cards, so if you have a set of controls that you need in more than one place you just need to create it once. Using groups can speed up your workflow enormously.
All the best,

Malte

bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

Stacks and Cards

Post by bjb007 » Mon Feb 18, 2008 11:16 pm

So my understand so far is that to anyone used
to VB, say the stack is the main window and the
cards are subroutines.

In which case as .rev file could be written in the
traditional way with a main prog and subroutines

Start
global

do while true
If mouseUp(btn1)
sub1(p1,p1)
endif
If mouseUp(btn2)
sub(p3,p4)
endif

etc. etc. with Rev commands and subs

exit

more or less.
Life is just a bowl of cherries.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”