On Sat, Apr 16, 2022, 12:26 PM Chris Angelico > wrote:
A button IS a widget.
A horizontal box IS a box.
A box IS a container.
A container IS a widget.

Class hierarchies in graphical systems are just as much based on those is-a relationships as any of those "horrible metaphors" you may have come across, and they are absolutely to do with programming. Just because you had a bad teacher, that doesn't mean the concepts are wrong.

Well, more like a few dozen bad books. I never studied any of this with a teacher. But when I teach it (to quite a lot of programming professionals), I never once mention that IS-A stuff, other than maybe curses sotto voce. And mostly they come away saying they finally understood it after my presentation.