Any good tutorials on KivyMD formatting and layout troubleshooting?

58 views
Skip to first unread message

Bill Marriott

unread,
Nov 15, 2022, 10:01:19 AM11/15/22
to Kivy users support
I consider myself  fairly competent with  Python and am  building a KivyMd app with lots of fuctionality - camera, local DB, authentication, sync to remote DB,  lots of screens  screenmanager, Appbar, NavigationLayout etc.  

My app works  but I am really struggling with laying out the widgets well in my screens  i.e the simple stuff!

There are so many related  or inherited properties  affecting nested widgets and even using the Inspector tool does not help me much because it does not show 'computed' formatting like a CSS debugger does.

I have watched hours of (good) tutorials from the likes of Codemy and others but they all gloss over formatting  and troubleshooting layout issues.

really really hate to ask for help on 'how to line up this widget with that widget'!


Any recommendations for tutorials that go deep into .kv formatting so I can get a good understanding of this stuff?





Elliot Garbus

unread,
Nov 15, 2022, 8:16:07 PM11/15/22
to kivy-...@googlegroups.com

From personal experience I think you just need to spend time with the Layouts and continually read the Kivy documents for the Layouts.

Here are a few suggestions:

  • When doing experiments with Layouts (or just to incrementally build layouts, use kivy buttons – they size to fill the available space – and are easy to control and understand.  You can also use the button push to print out info like size and position.  It is difficult to know the size of the label.
  • It looks like you are already familiar with the Inspector tool.  It can be very useful.
  • The Kivy Catalog app in the kivy examples directory has some interactive kv tools that you can use to do some simple interactive experiments with kv.  See:  …venv\share\kivy-examples\demo\kivycatalog
  • The layouts have interactions with pos_hints, some combinations are supported and some are ignored. It will be learned with carful reading of the kivy docs.

 

If you have some drawings or simple code – feel free to ask some questions.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/69c61df7-1d85-4968-b961-b6184aa3c1fdn%40googlegroups.com.

 

Bill Marriott

unread,
Nov 16, 2022, 8:16:33 PM11/16/22
to kivy-...@googlegroups.com
thanks for the tip
I will play around with the Catalog app.

Bill

Reply all
Reply to author
Forward
0 new messages