| |
| Publicado el 14,noviembre 2016 - 15:28 |
Hello Gang !! How to close Window on top when user clicks the area outside the Active Window ?? Any Idea ?? [attachment 2217 question1.jpg]
The exact condition is shown in the picture ... The Active window is to be closed if user clicks the inactive Area .. Thanks !! |
| |
| |
| | | |
|
| | |
| |
| Publicado el 14,noviembre 2016 - 15:43 |
Hi,
The parent Window (from which you opened this child-window) receives an notification whenever a child-window closes. See the "Closing a child window of Window..." event. Here you can close your child window with a simple Close(yourchild). |
| |
| |
| | | |
|
| | |
| |
| Publicado el 14,noviembre 2016 - 15:55 |
Hi Arie !! Say the name of my top window (active one) is win_noname2 and the bottom window is win_noname1
Now My Question is What to write and where (in which window and event) to write the code close (win_noname2) when user clicks in the area outside Win_noname2 or clicks in the window win_noname1?? Thanks again ! |
| |
| |
| | | |
|
| | |
| |
| Publicado el 14,noviembre 2016 - 16:11 |
Hi
because in android there is no modal window, the background one will receive the click normally and therefore will gain focus
So in the code of the window gaining focus, you can just close the secondary window (test if it exists first, of course)
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 14,noviembre 2016 - 16:59 |
Excuses. I did not read your question god enough. The event I am mentioned will fire when you close the CHILD window (win_noname2 in your case). So your parent window win_noname2 gets notified when you close the child window, from within this child window. That is not what you want. You need Fabrice's solution. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 14,noviembre 2016 - 17:31 |
you can do with simple trick
1. create a non maximize window 2. set the width / height of your target tablet 3. go to style , set background color to transparent 4. on windows code add "press/left button down" add code close() 5. drag a image control into the window (select window image)
now when user click other than the image control it will close
:D:D:D:D:D:D:D |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,noviembre 2016 - 02:06 |
Thanks Fabrice !! The Solution is not working with my case !! I guess I made some mistake ! The top window (ie. active one) was opened when I long pressed the looper row of background window(ie. not active ) with the code OpenMobileWindow(Win_ActiveOne).
The code is written in the long pressed event of loop_noname1 of background window .
Now the background window is not receiving the the click normally . |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,noviembre 2016 - 09:54 |
This is because a window can not be clicked. You can only click on controls. So if you click on a control of your background window it should work. Then the child-window is closed, the closing-code is run and also the "Closing a child window..." of your background window is called.
As a trick you can add a transparant image control in your background window and make sure it is below all other controls. This way every area of the window has a control. Or put this image as an overlay on top of all other controls of the background window, when you open the child-window and put it aside (i.e move it ouside the screen or to another plane) again when getting back from the child window. |
| |
| |
| | | |
|
| | |