iOS Question How to add the Page_Resize to new code Module

winjiadh

Active Member
Licensed User
Longtime User
I open the visual Designer, and click the File -> ColorsLayout
in the Abstract Designer
I click the mouse right button,chiose Generate-> Resize
in ColorsModule
Sub Page1_Resize (Width As Float, Height As Float)

End Sub
add it auto
And I add Msgbox("resize","pg") in the sub,like this
Sub Page1_Resize (Width As Float, Height As Float)
Msgbox("resize","pg")
End Sub
when I run it ,the event is not response

Help me
what's wrong with me?
thanks
I want add the Resize event in the ColorsModule.
 

Attachments

  • ResizeEvent.zip
    7.1 KB · Views: 157

winjiadh

Active Member
Licensed User
Longtime User
Don't use Msgbox to track the code flow. Use Log instead.

The event name is set to "pg" so the event sub should be:
B4X:
Sub pg_Resize (Width As Float, Height As Float)
Sorry, Erel
I change the code like you post
Msgbox("resize","pg")-> Log ("resize loged")
and rename
Sub Page1_Resize (Width As Float, Height As Float)->
Sub pg_Resize (Width As Float, Height As Float)
and run in localhost
but log nothing
what's wrong with me, please help me.
when I want add the the Page_Resize to new code Module, the right ways, thank you.
I post the test the ReaizeEvent. Can you changed it.
 

Attachments

  • ResizeEvent.zip
    7.1 KB · Views: 156
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Please use [code]code here...[/code] tags when posting code.

I do see the message here when I run your code as-is:

SS-2016-12-20_08.37.41.png
 
Upvote 0
Top