iOS Question Orientation

cooperlegend

Active Member
Licensed User
Hi, Is there a way to detect when the orientation has been changed?

If so can this be set to run a routine to reload the views, this would fix an issue I have with my B4A conversion.

Please don't point me again to AutoScaling and resize events, these wont work for me as I use several layered designs for each orientation, a quick redraw would fix this instead.
 

stevel05

Expert
Licensed User
The Page _Resize(Width As int,Height As Int) sub gets called when the orientation changes.
 

cooperlegend

Active Member
Licensed User
The Page _Resize(Width As int,Height As Int) sub gets called when the orientation changes.
Thanks for the reply, but I have tried this and this subroutine is never called (checked with debug)...

Is there a setting I am missing that triggers this?

I have tried "handle resize events" as true and as false....
 

klaus

Expert
Licensed User
How did you test it ?
I tried it with one of my projects and Page1_Resize is called every time I rotate the device !
That's also the purpose of this routine.
HandleReszeEvents = False doesn't avoid the call of Page1_Resize but doesn't resize the layout.

What orientations do you allow in Project Attributes ?
 
Last edited:

stevel05

Expert
Licensed User
It gets called regardless of the setting of that flag, have you created a page with a different eventname? You will need to change the sub name to match.
 

Attachments

Last edited:

cooperlegend

Active Member
Licensed User
Thanks

Sussed it

frmLogin.Initialize("frmLoginPage")

So needed

frmLoginPage_Resize instead of frmLogin_Resize

:)
 
Top