lock255 Well-Known Member Licensed User Longtime User May 31, 2014 #1 Hi, how can I do to move an image inside a panel randomly, each time you press the button?
NJDude Expert Licensed User Longtime User Jun 1, 2014 #2 Use the view's Left and Top properties. B4X: Button1.Left = randomValueX Button1.Top = randomValueY You will of course have to keep in consideration the width and height of the panel. Upvote 0
Use the view's Left and Top properties. B4X: Button1.Left = randomValueX Button1.Top = randomValueY You will of course have to keep in consideration the width and height of the panel.
lock255 Well-Known Member Licensed User Longtime User Jun 1, 2014 #3 For the size of the various objects use the percentages, it is not possible to move the objects randomly but using measures in percentage? Upvote 0
For the size of the various objects use the percentages, it is not possible to move the objects randomly but using measures in percentage?
Erel B4X founder Staff member Licensed User Longtime User Jun 1, 2014 #4 B4X: Button1.Left = Rnd(0, ParentPanel.Width) Upvote 0