Android Question Location of B4XView CreatePanel("")

rodmcm

Active Member
Licensed User
Longtime User
Hi...
B4X:
dialog.Title = "Add/Edit Step Data"
    Dim p As B4XView = xui.CreatePanel("")
    p.Left = 10dip
    p.Top  = 10dip
    p.SetLayoutAnimated(0, 0dip, 0dip, 700dip, 200dip)
    p.LoadLayout("StepDialog")
    Wait For (dialog.ShowCustom(p, "OK", "", "CANCEL")) Complete (Result As Int)

The panel always centers on my display
p.left, p.top changes nothing.
SetLayoutAnimated length and width operate.

How do I put p where I want it on the screen?
 

Johan Schoeman

Expert
Licensed User
Longtime User
There is probably a clue here (root)

 
Upvote 0

aeric

Expert
Licensed User
Longtime User
I tried it. The panel is always loaded with left = 0 and top = 0.
What are you trying to achieve?
Why don't you use the Layout Designer to position the views inside the panel?
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…