Card Size
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Card Size
What are the tricks for getting stacks to open and show all of what you want to be showing on the card. Typically my cards have some text fields at the top, a dataGrid in the middle and some buttons at the bottom. I can struggle to make the window just the size I want and set the geometry of the objects so that when the window is resized everything moves as desired. I can then save the stack and quit Rev. The next time I start Rev and open that stack, the buttons at the bottom are not showing or only partially showing. If I resize the window I can make the buttons appear as they should and they stay visible while I use the stack.
If I compile the application to a standalone, the truncated windows show up in most of my stacks and even those that are opened modally. Resizing them takes care of the problem for that use of the application but they are truncated the next time the application is run. It seems pretty silly to me to have to resize with every use.
This brings me to another question that may be related to my problem. While working in the IDE, what gets 'Saved' when you take the Save option from the File Menu? Also, what gets saved when you press the 'Close' button (red) on a Mac and it asks you if you want to' save the changes'. The changes I make do not seem to want to stick. I am using Rev Enterprise 4.0.0.
Thanks for any help you can give,
Larry
If I compile the application to a standalone, the truncated windows show up in most of my stacks and even those that are opened modally. Resizing them takes care of the problem for that use of the application but they are truncated the next time the application is run. It seems pretty silly to me to have to resize with every use.
This brings me to another question that may be related to my problem. While working in the IDE, what gets 'Saved' when you take the Save option from the File Menu? Also, what gets saved when you press the 'Close' button (red) on a Mac and it asks you if you want to' save the changes'. The changes I make do not seem to want to stick. I am using Rev Enterprise 4.0.0.
Thanks for any help you can give,
Larry
Re: Card Size
Hi Larry
Off the top of my head, try putting the following in the card script of the stack you want to size:
Should do the trick.

Off the top of my head, try putting the following in the card script of the stack you want to size:
Code: Select all
on preOpenCard
set the width of stack "Suchandsuch" to 400
set the height of stack "SuchandSuch" to 600
end preOpenCard

Re: Card Size
Larry,
what operating system? Are you using menus?
It sounds like you are on a mac and your stack is doing this adjust for menus thing.
As far as I know everything, including size and position is saved. Just if you have the menu set to adjust it everything will move up 22 some pixel.
I find the menu setting for MacOs very confusing.
You can force the size and position by script as gyroscope (hi gyroscope) suggested, I would try to work out the menu thing first.
regards
Bernd
what operating system? Are you using menus?
It sounds like you are on a mac and your stack is doing this adjust for menus thing.
As far as I know everything, including size and position is saved. Just if you have the menu set to adjust it everything will move up 22 some pixel.
I find the menu setting for MacOs very confusing.
You can force the size and position by script as gyroscope (hi gyroscope) suggested, I would try to work out the menu thing first.
regards
Bernd
Re: Card Size
Thanks gyroscope and Bernd,
I have decided to use gyroscope's technique for the stacks that I open modally. The user shouldn't have any reason to want to resize those. For the regular stack opening, I will see if I can stick with Bernd's wishes. I have implemented the following for the regular stacks to see If that will help. I have put the following in the stack's preOpenCard:
I'll see how this pans out.
Larry
I have decided to use gyroscope's technique for the stacks that I open modally. The user shouldn't have any reason to want to resize those. For the regular stack opening, I will see if I can stick with Bernd's wishes. I have implemented the following for the regular stacks to see If that will help. I have put the following in the stack's preOpenCard:
Code: Select all
get the height of stack "SuchAndSuch"
put it into tHeight
set the height of stack "SuchAndSuch" to tHeight + 22
Larry
Re: Card Size
Larry said:
Back to the drawing board. I guess gyroscope's way is what I'll have to settle with unless there is some good way to handle it. This is for a Mac with menus originally produced in the MenuBuilder.
Larry
And I'm back to say in doesn't - unless you want the window to get taller every time you move to another card. Even in the preOpenStack it will give the same problem if the stack is closed and opened repeatedly.'ll see how this pans out.
Back to the drawing board. I guess gyroscope's way is what I'll have to settle with unless there is some good way to handle it. This is for a Mac with menus originally produced in the MenuBuilder.
Larry
Re: Card Size
Larry, I had the same problem. Make a card with large field & a small status field below. Use the geometry pane to setup scaling & positioning. Works great in the IDE--sizes & position are correct, and it scales/positions properly. But build an application & run it, the window opens & you can't see the small status field below. Resize the window any amount & everything appears correct.
This solved the problem for me. I hardcoded the window size in the stack script.
Then in the card script call the geometry manager to refresh:
You may be able to just call revUpdateGeometry in the stack or card script, but this worked for me & I thought I'd quickly pass it along.
This solved the problem for me. I hardcoded the window size in the stack script.
Code: Select all
on preOpenStack
set the height of window "MyApp" to 350
set the width of window "MyApp" to 540
set the top of window "MyApp" to 47
set the left of window "MyApp" to 9
end preOpenStack
Code: Select all
on openCard
revUpdateGeometry
end openCard
Re: Card Size
Thanks dablock,
I'll give that a try.
Larry
I'll give that a try.
Larry
Re: Card Size
It seems to work great. Thanks dablock.
Larry
Larry