J jai Active Member Licensed User Longtime User Aug 17, 2018 #1 How can the position and size of a CustomView Numpad (TextField) initiated in the Designer be changed programmatically? These values can be changed on the fly as- B4X: Private Numpad1 As Numpad Dim p As Panel p=Numpad1.getbase p.Left=100dip p.Top=140dip p.Width=55dip p.Height=20dip How can these values now be saved as the new size and position of Numpad1 that can be used in other Subs?
How can the position and size of a CustomView Numpad (TextField) initiated in the Designer be changed programmatically? These values can be changed on the fly as- B4X: Private Numpad1 As Numpad Dim p As Panel p=Numpad1.getbase p.Left=100dip p.Top=140dip p.Width=55dip p.Height=20dip How can these values now be saved as the new size and position of Numpad1 that can be used in other Subs?
Erel B4X founder Staff member Licensed User Longtime User Aug 19, 2018 #2 Watch the B4J / B4i Resize Event video tutorial: https://www.b4x.com/etp.html You should either change the position in Page_Resize event or disable the automatic resizing (not good). B4X: Private Sub Page1_Resize(Width As Int, Height As Int) Numpad1.GetBase.SetLayoutAnimated(0, 1, 50, 20, 300, 50) End Sub Upvote 0
Watch the B4J / B4i Resize Event video tutorial: https://www.b4x.com/etp.html You should either change the position in Page_Resize event or disable the automatic resizing (not good). B4X: Private Sub Page1_Resize(Width As Int, Height As Int) Numpad1.GetBase.SetLayoutAnimated(0, 1, 50, 20, 300, 50) End Sub