Chapter 5. Toolbars, buttons, and docked items
This chapter covers
- Unlocking the secrets of docking
- Mastering the toolbar
- Using and customizing buttons
In previous chapters we covered a lot of foundational topics, including the component life cycle, containers, and layouts. Many of the examples encountered thus far made use of docked items via toolbars, which set the stage for you to master the topics in this chapter, including toolbars, buttons, or anything else you want to dock.
You’re already aware that containers and panels have the ability to dock widgets, so this chapter focuses on expanding on that concept. You’ll learn how to dock just about any widget to any of a container’s outer quadrants. In the process, you’ll discover the importance of the order of docked items. You’ll see a variety of ways to organize buttons and other widgets inside the toolbar. There you’ll learn how to use the spacer component as well as customize the toolbar’s HBoxLayout implementation.
The chapter ends by unraveling the secrets of buttons, and you’ll learn how to customize their appearance by exploiting the built-in configuration options. Although this chapter is a bit shorter and doesn’t cover quite as many topics as the others, the experience gained will be absolutely necessary for almost any application you build.