Strange effect with geometry scaling
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Strange effect with geometry scaling
Hi
I have an app that its minimum size is 1024 x 768 and you can grab the corner and scale it bigger.
I have two cards in that app
I have a datagrid in both.
I have set up the properties of those datagrid to resize according to the window size using geometry.
When I grab the corner and manually resize, both works perfectly. The window resizes and the datagrid scales accordingly.
BUT
If I maximise the window and enter the cards, one data grid correctly rescales to the full window size and one does not.
The one that does not will rescale as soon as I unmaximise the windows and drag the corner.
I have check the geometry and both are identical in the scale to RIGHT and BOTTOM are selected and nothing else.
I do not know what the difference is or how to ask Livecode to check geometry.
Any ideas?
I have an app that its minimum size is 1024 x 768 and you can grab the corner and scale it bigger.
I have two cards in that app
I have a datagrid in both.
I have set up the properties of those datagrid to resize according to the window size using geometry.
When I grab the corner and manually resize, both works perfectly. The window resizes and the datagrid scales accordingly.
BUT
If I maximise the window and enter the cards, one data grid correctly rescales to the full window size and one does not.
The one that does not will rescale as soon as I unmaximise the windows and drag the corner.
I have check the geometry and both are identical in the scale to RIGHT and BOTTOM are selected and nothing else.
I do not know what the difference is or how to ask Livecode to check geometry.
Any ideas?
Re: Strange effect with geometry scaling
When you switch card the resize message is not sent to the card, so it's remain to the old size value.
so you need to use this trick:
so you need to use this trick:
Code: Select all
on OpenCard
put the width of me into tx
set the width of this stack to (tx + 1)
end OpenCard
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Strange effect with geometry scaling
Yet another option is to use revUpdateGeometry.
shiftLock happens
-
- VIP Livecode Opensource Backer
- Posts: 7228
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Strange effect with geometry scaling
Just send the resizestack message yourself:
Code: Select all
on preopencard
resizestack
end preopencard
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Strange effect with geometry scaling
This get the error no message found.jacque wrote:Just send the resizestack message yourself:
Code: Select all
on preopencard resizestack end preopencard
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
-
- VIP Livecode Opensource Backer
- Posts: 7228
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Strange effect with geometry scaling
It would depend on where the resizeStack handler is located, and if there is one. If the developer hasn't created a resizeStack handler then it won't be found. Also, I should have added the parameters to the call:MaxV wrote:This get the error no message found.jacque wrote:Just send the resizestack message yourself:
Code: Select all
on preopencard resizestack end preopencard
Code: Select all
on preopencard
resizestack the width of this stack,the height of this stack
end preopencard
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Strange effect with geometry scaling
Jacque,
your code create errors.
You can't use that way. At least not in Livecode 9.
You can't call resizeStack message. You can use only this way:
your code create errors.
You can't use that way. At least not in Livecode 9.
You can't call resizeStack message. You can use only this way:
Code: Select all
on ReasizeStack
...
pass resizeStack
end ResizeStack
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
-
- VIP Livecode Opensource Backer
- Posts: 7228
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Strange effect with geometry scaling
I've called resizeStack in several apps without errors, but the stack does have to have a resizeStack handler in the message hierarchy where the engine can find it. However, I see now that that OP isn't using a resizeStack handler at all, he's using the geometry settings.
In that case, he should call "revUpdateGeometry" instead and it should work.
In that case, he should call "revUpdateGeometry" instead and it should work.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Strange effect with geometry scaling
Ok. Thanks peeps for the guidance.
I have found the perfect solution combining the best of all entries
on preopencard
put the width of me into tx
set the width of this stack to (tx + 1)
end preopencard
Simples
I have found the perfect solution combining the best of all entries
on preopencard
put the width of me into tx
set the width of this stack to (tx + 1)
end preopencard
Simples