本文介紹了找不到 TableRecycleGridLayout 來修復 Kivy 代碼的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
嘗試在 KivyMD 中創建表時出錯
I'm getting an error trying to create a table in KivyMD
ValueError:TableRecycleGridLayout.orientation 設置為無效選項垂直".必須是以下之一:['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl']
它告訴我我需要將方向更改為垂直"以外的方向,但我在任何地方都找不到.
It's telling me I need to change orientation to something other than 'vertical' but I can't find it anywhere.
推薦答案
我找到了一個解決方法,即從TableRecycleGridLayout:"中刪除orientation:'vertical'.在kivymd/uix/datatables.py中如下圖:
I found a fix which was to simply remove orientation:'vertical' from "TableRecycleGridLayout:" in kivymd/uix/datatables.py as shown below:
TableRecycleGridLayout:
id: row_controller
key_selection: "selectable"
cols: root.total_col_headings
cols_minimum: root.cols_minimum
default_size: None, dp(52)
default_size_hint: 1, None
size_hint: None, None
height: self.minimum_height
width: self.minimum_width
multiselect: True
touch_multiselect: True
現在運行您的程序.分享您的意見.
Now run your program. Share your comments.
這篇關于找不到 TableRecycleGridLayout 來修復 Kivy 代碼的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!