Years ago, I started posting reviews here of various pygame GUIs, and reviewed 3 or 4.

My own choice was OcempGUI, but have recently fallen out with it.   I have been looking at Albow as a replacement candidate, and implemented my comparison app in it.

To start, I had to write a new RootWidget that allows iterative operation,  called per-frame from my own loop.  That sub-class RootWidget will be included here in a later post.

Albow has a decent collection of widgets; the only widgets my app wanterd that weren’t included were a progress-bar and toggle-buttons.  The progress bar could be implemented fairly easily, and the toggle-button is just a different look for a check-box, so neither omission is a great loss.

Only the Button widget was complete, for my purposes.  Other widgets, I had to sub-class to add the logging feature.  It was necessary to sub-class, incorporating the ButtonBase mixin, to add an ‘action’ attribute calling the logging function.   None of these sub-classing chores were difficult, as the module is fairly straightforward to understand and classes easy to derive from.   I was able to disable the check-box and radio button widgets,  but they showed no outward sign of being disabled.  The ‘action’ attribute just stopped working.

Styling Albow widgets was as easy as any library I have reviewed.   Just set border_color and fg_color attributes to 3-tuple colors, and it’s good.

The code for the app is in the next post, and the NewRootWidget is in the post after that.  Feel free to use any as you wish.

Advertisements