wimpie3 Well-Known Member Licensed User Longtime User Feb 3, 2017 #1 When I look at all Panel values in the tree debug mode, I can see the property "mMeasuredWidth". How can I access this property? I have tried the following: Code: Dim jo As JavaObject=myPanel log(jo.RunMethod("getMeasuredWidth", Null)) but it returns 0 (which is not the value shown in the debug tree explorer).
When I look at all Panel values in the tree debug mode, I can see the property "mMeasuredWidth". How can I access this property? I have tried the following: Code: Dim jo As JavaObject=myPanel log(jo.RunMethod("getMeasuredWidth", Null)) but it returns 0 (which is not the value shown in the debug tree explorer).
wimpie3 Well-Known Member Licensed User Longtime User Feb 3, 2017 #2 SOLVED. In case someone else sees this, the reason for the 0 was that the panel was not yet drawn. Add a DoEvents before the call and the correct number will be returned. Upvote 0
SOLVED. In case someone else sees this, the reason for the 0 was that the panel was not yet drawn. Add a DoEvents before the call and the correct number will be returned.
Erel B4X founder Staff member Licensed User Longtime User Feb 5, 2017 #3 Panel.Width should return the correct width. Upvote 0