Module 2 — Building Blocks
Every wxRuby3 application is assembled from the same set of pieces: a frame to hold the window, a panel to host the controls, sizers to manage the layout, widgets for user interaction, menus for commands, and dialogs for focused tasks. These are the building blocks — and once you know them, you can build almost anything.
This module works through each piece in turn. The early lessons are deliberately focused: one concept, explained thoroughly, with working code you can run. By the time you reach the capstone, combining them will feel natural rather than overwhelming.
Lessons in this module
- Frames and panels — The skeleton of every app: top-level windows, panels, status bars, and the close event
- Core widgets — The controls users interact with: buttons, text fields, checkboxes, radio buttons, sliders, and more
- Layout with sizers — How wxRuby3 positions controls: box sizers, grid sizers, and the flags that control spacing and alignment
- Menus and toolbars — Adding menu bars, submenus, keyboard shortcuts, and toolbar buttons
- Dialogs — Standard dialogs for common tasks, and how to build your own
- Capstone: preferences panel — A tabbed preferences dialog that brings every concept in this module together
What you will have by the end
A solid working knowledge of the wxRuby3 widget set and a complete tabbed preferences panel — the kind of polished UI component that appears in almost every real application. You will understand not just how to create widgets, but how to compose them into a layout that works correctly across platforms and responds cleanly to user interaction.