Closed erichiggins closed 1 year ago
If I amend demos/lisbox.py
so that bdcolor=False
, no border is drawn unless the listbox has focus. In this case it shows a white border. If the listbox has the focus and is in adjustment mode, a LIGHTGREEN
border is shown. This is in common with other adjustable widgets, a special border is drawn to indicate focus, adjustment or precision modes. The bdcolor
arg defines the border color when a control does not have the focus.
These colors can be varied using the color_map
in colors.py
, but the changes will affect all controls.
As far as I can see the control behaves as per the docs. Feel free to open a new issue if you can produce a version of the listbox demo that exhibits a problem.
My setup:
Issue details:
Using a ListBox widget, I've tried the following to remove the outer border:
bdcolor
:ListBox(wri, 2, 2, elements=els)
bdcolor=False
bdcolor=None
None of these appear to work reliably, though I have noticed that occasionally they render correctly without the border when navigating through my menu.
Potentially related: the code does not appear to match the documentation:
The docs for Listbox widget:
https://github.com/peterhinch/micropython-micro-gui/blob/main/README.md#67-listbox-widget
The code in
Widget.__init__
It is checking for
None
rather thanFalse
, which doesn't match the docs nor the default argument values defined inListbox.__init__
:https://github.com/peterhinch/micropython-micro-gui/blob/main/gui/core/ugui.py#L684
snippet of line linked above: