LiveCode Popup modal Window
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
LiveCode Popup modal Window
In my project, I have added another stack to place my pop up windows for my android app. When the pop up is loaded, it covers the whole screen and I don;t want that. When testing in LiveCode, it displays correctly, but when testing in in my android phone, the pop up window covers the whole screen.
How do I set it up in the script so that the modal windows do not cover the whole screen. but shows the background card a bit darker than the pop up window. Any help will be greatly appreciated.
How do I set it up in the script so that the modal windows do not cover the whole screen. but shows the background card a bit darker than the pop up window. Any help will be greatly appreciated.
-
- Livecode Opensource Backer
- Posts: 9380
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: LiveCode Popup modal Window
Have you defined the dimensions of your modal window?
In stack of modal window:
-
-
Just a thought.
Mind you, as far as I know Android and iOS ONLY allow one window to be open at a time.
In stack of modal window:
Code: Select all
on preOpenStack
set the width of me to 150
set the height of me to 100
end preOpenStack
Just a thought.
Mind you, as far as I know Android and iOS ONLY allow one window to be open at a time.
Last edited by richmond62 on Mon Jul 06, 2020 10:16 am, edited 1 time in total.
Re: LiveCode Popup modal Window
I tried changing the size on load but still not working....
-
- Posts: 720
- Joined: Thu Sep 11, 2014 1:49 pm
- Location: The Netherlands
Re: LiveCode Popup modal Window
Maybe you could trick the situation with generating a PrintScreen and placing it as a background in the Modal Windows Stack?
Just an idea....
Just an idea....
Re: LiveCode Popup modal Window
good idea, I wonder if I could take a screenshot at runtime and automatically make it the background of my modal window...I'll dig around on that.
I still don't understand why the size is not working on runtime. could it be my main stack settings are overriding the dimensions on my sub-stack?
I still don't understand why the size is not working on runtime. could it be my main stack settings are overriding the dimensions on my sub-stack?
Re: LiveCode Popup modal Window
HI wmiriye,
THIS is the key:
1. Create an opaque graphic in size of your stack/card
2. Set its blendlevel (optional)
3. Create a field and a button, and/or whatever you want to appear in your "modal window fake"
4. GROUP everything from 1 to 3
5. Hide this group
Now you can "open" the "fake" stack with:
You get the picture.
OR use the OS ASK and ANSWER dialogs.
Best
Klaus
THIS is the key:
See above, that is the reason why every stack will be resized to cover the complete screen on mobile!richmond62 wrote: ↑Mon Jul 06, 2020 7:23 amMind you, as far as I know Android and iOS ONLY allow one window to be open at a time.
You could fake it like this:
1. Create an opaque graphic in size of your stack/card
2. Set its blendlevel (optional)
3. Create a field and a button, and/or whatever you want to appear in your "modal window fake"
4. GROUP everything from 1 to 3
5. Hide this group
Now you can "open" the "fake" stack with:
Code: Select all
...
show grp "my fake stack"
...
OR use the OS ASK and ANSWER dialogs.
Best
Klaus
Re: LiveCode Popup modal Window
Thanks Klaus, will do that. Too bad, one window shows up at a time.
Re: LiveCode Popup modal Window
Used groups and hide and showed them as pop ups. works nice.