DALB Active Member Licensed User Sep 21, 2025 #1 Hello, looking at the forums, I didn't find if it is possible to write a variable in the script designer like this : Code: Copy r =27/359 label1.left=r%x r=152/359 label1.width=r%x I have read that the formula 'r%x' seems impossible to use. Thanks much for answering
Hello, looking at the forums, I didn't find if it is possible to write a variable in the script designer like this : Code: Copy r =27/359 label1.left=r%x r=152/359 label1.width=r%x I have read that the formula 'r%x' seems impossible to use. Thanks much for answering
E emexes Expert Licensed User Longtime User Sep 21, 2025 #2 Maybe something like this: B4X: Copy r = 27 / 359 label1.left = r * 100%x r = 152 / 359 label1.width = r * 100%x Last edited: Sep 21, 2025 Upvote 0
Maybe something like this: B4X: Copy r = 27 / 359 label1.left = r * 100%x r = 152 / 359 label1.width = r * 100%x
klaus Expert Licensed User Longtime User Sep 21, 2025 #3 Or this: B4X: Copy w = 100Xx r =27/359 label1.left=r * w r=152/359 label1.width=r * w Upvote 0
E emexes Expert Licensed User Longtime User Sep 21, 2025 #4 @klaus beat me to the finish line via a similar route, but hey, the more options you have, the merrier This is probably better: B4X: Copy width = 100%x Button1.left = width * 27 / 359 Button1.width = width * 154 / 359 or if you're doing multiple buttons that are aligned in some way, use multiple variables: B4X: Copy width = 100%x buttonleft = width * 27 / 359 buttonwidth = width * 154 / 359 Button1.Left = buttonleft Button1.Width = buttonwidth Button2.Left = buttonleft Button2.Width = buttonwidth Button3.Left = buttonleft Button3.Width = buttonwidth Upvote 0
@klaus beat me to the finish line via a similar route, but hey, the more options you have, the merrier This is probably better: B4X: Copy width = 100%x Button1.left = width * 27 / 359 Button1.width = width * 154 / 359 or if you're doing multiple buttons that are aligned in some way, use multiple variables: B4X: Copy width = 100%x buttonleft = width * 27 / 359 buttonwidth = width * 154 / 359 Button1.Left = buttonleft Button1.Width = buttonwidth Button2.Left = buttonleft Button2.Width = buttonwidth Button3.Left = buttonleft Button3.Width = buttonwidth
DALB Active Member Licensed User Sep 21, 2025 #5 All of you save my day. Thank you very much ! Here I find the most concentred clever people of the world ! Upvote 0
All of you save my day. Thank you very much ! Here I find the most concentred clever people of the world !
LucaMs Expert Licensed User Longtime User Sep 21, 2025 #6 DALB said: Here I find the most concentred clever people of the world ! Click to expand... But there is always an exception: Upvote 0
DALB said: Here I find the most concentred clever people of the world ! Click to expand... But there is always an exception: