Python Basics Tutorial Kivy Widget Spacing & Text Alignment

preview_player
Показать описание
Learn how to use widget spacing and align text for kivy objects for python programming

twitter: @python_basics

#pythonprogramming #pythonbasics #pythonforever
Start:
orientation: 'vertical'
Label:
size_hint_x: 2
BoxLayout:
spacing: 46
height: '30dp'
size_hint_y: None
Label:
width: '274dp'
size_hint_x: None
text: "User Name"
pos_hint_x: 2
halign:'right'
valign:'center'
TextInput:
width: '320dp'
size_hint_x: None
BoxLayout:
height: '30dp'
size_hint_y: None
Label:
size_hint_x: 1
Label:
size_hint_x: 1
text: "Password"
TextInput:
size_hint_x: 2
Label:
BoxLayout:
orientation: 'vertical'
Label:
BoxLayout:
Label:
Button:
width: '150dp'
size_hint_x: None
text: "Login"
Label:
Label:
BoxLayout:
Label:
Button:
text: "?? Create Account ??"
Label:
Label:
Рекомендации по теме
Комментарии
Автор

immediately found what I was searching for, which was text alignment, and then some! Thanks!

lastnamefirstname
Автор

Yes. Text alignment. Thank you!

Kivy looks great at first but then weird stuff like having to define the text_size specifically before halign will work wastes enormous amounts of time. Found it here though thanks. Still using Kivy but it has some real problems.

timevtech
Автор

It's an honor to be the first person to view this 😊

carlmarasigan
Автор

I'd like to watch your videos, but man!, you need to do what so many have figured out already, and zoom your IDE so people can read and follow along as you code or reference code in your tutorial examples. Also, do you have a tutorial on how to properly create and dismiss a popup window? Please reply... Thanks... Tim

FRIENDSofCAP
Автор

OK... Some more constructive feedback. And, I hope you take it that way as it is intended... Dude, I have been programming since 1984, beginning on the Apple 2C with Basic but am new in the last couple of months to Python and in the last week to kivy. This! IS EXACTLY THE WRONG WAY TO TEACH A PROGRAMMER HOW TO LAYOUT A UI. Instead, you should ALWAYS show them how to do it the RIGHT / CORRECT way. It's like the old ugly way folks used tables to layout web pages. That is no longer really accepted. But I will check out a few more vids to see how and what you are offering as I need some good kivy help.

FRIENDSofCAP