N Nataly Member Oct 19, 2021 #1 Hello I have multiple buttons that I want to center, I also want these buttons to adapt with screen sizes, for example on tablet, these four buttons must be in one row since they can fit all together on the tablet's screen. Thank you, Nataly
Hello I have multiple buttons that I want to center, I also want these buttons to adapt with screen sizes, for example on tablet, these four buttons must be in one row since they can fit all together on the tablet's screen. Thank you, Nataly
Erel B4X founder Staff member Licensed User Longtime User Oct 19, 2021 #2 Nataly said: I have multiple buttons that I want to center Click to expand... Put them in a panel and use the designer script: Code: Panel1.CenterHorizontal = 50%x Panel1.CenterVertical = 50%y Nataly said: these four buttons must be in one row since they can fit all together on the tablet's screen Click to expand... Use two layout variants. One for small devices and one for tablets. Upvote 0
Nataly said: I have multiple buttons that I want to center Click to expand... Put them in a panel and use the designer script: Code: Panel1.CenterHorizontal = 50%x Panel1.CenterVertical = 50%y Nataly said: these four buttons must be in one row since they can fit all together on the tablet's screen Click to expand... Use two layout variants. One for small devices and one for tablets.
N Nataly Member Oct 20, 2021 #3 Erel said: Code: Panel1.CenterHorizontal = 50%x Panel1.CenterVertical = 50%y Click to expand... Hello Erel, I did put them in a panel and used your code, but they are not centered, and I think you mean HorizontalCenter, VerticalCenter method not the opposite. Upvote 0
Erel said: Code: Panel1.CenterHorizontal = 50%x Panel1.CenterVertical = 50%y Click to expand... Hello Erel, I did put them in a panel and used your code, but they are not centered, and I think you mean HorizontalCenter, VerticalCenter method not the opposite.
Erel B4X founder Staff member Licensed User Longtime User Oct 20, 2021 #4 Nataly said: and I think you mean HorizontalCenter, VerticalCenter method not the opposite. Click to expand... True. Best if you create a small project with this layout and upload it. Upvote 0
Nataly said: and I think you mean HorizontalCenter, VerticalCenter method not the opposite. Click to expand... True. Best if you create a small project with this layout and upload it.