Python Forum
[Kivy] args converter-help
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Kivy] args converter-help
#1
hey guys,

I am making a mobile app using kivy, but I cannot understand how the args converter works!, I want it to make my main list work. I read a lot but I think there is no much information about it.
after 'text': when we use x, rec or , ... etc.? and when do we use \ before the brackets?
maybe it is a simple thing but I am a bit new to python and kivy any help ??

list_item_args_converter = lambda row_index, x: {'text': x,
                                                 'size_hint_y': None,
                                                 'height': 25}
args_converter = lambda row_index, rec: \
        {'text': rec['text'],
         'size_hint_y': None,
         'height': 25,
         'cls_dicts': [{'cls': ListItemButton,
                        'kwargs': {'text': rec['text']}},
                       {'cls': ListItemLabel,
                        'kwargs': {'text': rec['text'],
                                   'is_representing_cls': True}},
                       {'cls': ListItemButton,
                        'kwargs': {'text': rec['text']}}]}
thank you
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyQt] Drag and drop converter Raures 0 4,470 Oct-01-2017, 07:44 PM
Last Post: Raures
  [Tkinter] How to pass args from GUI to pre-written script. Travolta 2 2,751 Aug-08-2017, 06:09 PM
Last Post: Travolta

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020