B4J Question B4XPages of different window sizes

rbirago

Active Member
Licensed User
Longtime User
In B4A the window size is always the smartphone screen size, but in B4J this is not always true. The question is: if I use B4Xpages the window size of the called pages have always the same size of mainform or there is a way to change these sizes? For now, when I want to have different window sizes, I use standard code modules. Is this the right way?
Thanks.
 

stevel05

Expert
Licensed User
Longtime User
Try
B4X:
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    'load the layout to Root
    Dim F As Form = B4XPages.GetNativeParent(Me)
    F.WindowWidth = 400
    F.WindowHeight = 400
    
End Sub
 
Upvote 0
Top