peterhinch / micropython-micro-gui

A lightweight MicroPython GUI library for display drivers based on framebuf, allows input via pushbuttons. See also micropython-touch.
MIT License
247 stars 37 forks source link

Error in docs-- RadioButtons #29

Closed bahronheim closed 1 year ago

bahronheim commented 1 year ago

Sorry if this is a minor issue, but being a novice, it caused me a bit of head scratching until I figured it out...

In the "typical usage" section, the code reads: rb = RadioButtons(callback, BLUE) # color of selected button

The constructor for the RadioButtons is: def init(self, highlight, callback=dolittle, selected=0):

So it expects the highlight color first.

So unless I'm mistaken, the parameter positions should be swapped: rb = RadioButtons(BLUE, callback) # color of selected button

peterhinch commented 1 year ago

Thank you. Now fixed.