You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also the docs state that data argument is a "list of str". Is that still true, or does it have to be a list of dict now?
Is there a variant for horizontal/row lists? e.g. is style = Pack( direction=COLUMN ) supported?
Is DetailedList too restricted/specific for a generic widget? What if I want more than one icon? What if I want an Icon, some text then an icon, etc, ...
What's the best way to implement a custom DetailedList? List of Widgets, Boxes?
The text was updated successfully, but these errors were encountered:
Based on some experiments (macOS), it seems that data must be a list of dictionaries (not str), with the special keys: 'icon', 'title' and 'subtitle' and all keys must be specified otherwise exceptions are generated.
Unused keys can be set the None, however the icon renders as a grey square (instead of no icon or a "transparent" icon as a filler.
Further, if the list refreshed by pulling down or up, then exceptions are generated if keys are set to None.
Multiline strings seem to be supported by macOS implementation, but the strings bleed into the lower list items. I'm guessing the height of the box generated for the item assumes a single line of text. On iOS only one line is rendered.
The selection handler documentation is wrong. The handler arguments should be (widget, row), not (widget, selection)
BrendanSimon
changed the title
DetailedList documentation for special keys
DetailedList, documentation, special keys, multiline text
Jan 1, 2020
In this PyCon talk by Russel, it is mentioned that
DetailedList
knows about some special key names for lists of dictionary objects.https://youtu.be/qaPzlIJ57dk?t=789
These special keys are not mentioned in the API docs. What are the full list of special keys?
https://toga.readthedocs.io/en/latest/reference/api/widgets/detailedlist.html
Also the docs state that
data
argument is a "list of str". Is that still true, or does it have to be alist
ofdict
now?Is there a variant for horizontal/row lists? e.g. is
style = Pack( direction=COLUMN )
supported?Is
DetailedList
too restricted/specific for a generic widget? What if I want more than one icon? What if I want an Icon, some text then an icon, etc, ...What's the best way to implement a custom
DetailedList
? List of Widgets, Boxes?The text was updated successfully, but these errors were encountered: