B4J Question [Solved] B4XView width

Daestrum

Expert
Licensed User
Longtime User
How do I get the width of a B4XView?

I have tried .width but that returns -1
I have tried "getPrefWidth" that returns -1.

Not sure what else to try to get the width.

(the view was added in code not designer)
 

Daestrum

Expert
Licensed User
Longtime User
Sorted, it was the
B4X:
MainForm.RootPane.AddNode(??,??,??,-1,-1)
that caused the problem, If I replace the -1's with the values I want it all works fine.

But, I will bear in mind the comment about the designer.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…