remi
remi copied to clipboard
Label and SpinBox widgets do not align
I tried to apply style="text-align: right; vertical-align: middle" to both Label and SpinBox objects that are arranged side by side with the same height setting. But it seems the "vertical-align: middle" does not have any effect. These two objects always misaligned vertically even within the same HBox. Why does it work this way?
Hello, can you please send me an image and a simple example script? I will try to fix it
Hi @dddomodossola , thanks for your timely feedback. The relevant code snippet looks like
self.lbl_start = gui.Label("Start: ", width=80, height=30, style="text-align: right; vertical-align: middle")
self.spin_start = gui.SpinBox(self.start, LL, UL, STEP, width=50, height=30, style="margin-left: 10px; vertical-align: middle")
hbox = gui.HBox(width=1200, height=100, style="position: relative; left: 20px; top: 20px; justify-content: left")
hbox.append({"lbl_start": self.lbl_start, "spin_start": self.spin_start})
The UI effect looks like
You can see that vertically they are misaligned.