-
Hello all, class left_frame(Container)
def compose(self) -> ComposeResult:
self.styles.content_align = ("center","bottom")
yield Container(
Vertical(
...
...
Label("Placeholder Text", id="question"),
Static("Calculate #"),
...
Button("Fullscreen", id="yes", variant="primary"),
Button("Draw!", id="no", variant="error"),
Switch("Fullscreen"),))
class main(App):
def compose(self) -> ComposeResult:
yield left_frame()
left_frame().run() I expect the buttons and switches to be centered but instead the following output is produced: A noob question but I have been racking my head without success, so thank you for any help. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
As mentioned when you asked on Discord, this discussion will help: #1919 |
Beta Was this translation helpful? Give feedback.
-
Hi Guys. from textual.app import App, ComposeResult class Center( Horizontal ): class Center2( Horizontal ): class LeftFrame( Container ):
class SazeyGitApp( App[ None ] ):
if name == "main": |
Beta Was this translation helpful? Give feedback.
As mentioned when you asked on Discord, this discussion will help: #1919