Using the Font Combo Box widget
The Font Combo Box widget, as the name suggests, displays a list of font styles to choose from. The chosen font style can be applied to the desired content if required.
Getting ready
To understand the workings of the Font Combo Box widget practically, let's create a recipe. This recipe will display a Font Combo Box widget and a Text Edit widget. The user will be able to type the desired content in the Text Edit widget. After typing the text in the Text Edit widget, when the user selects any font style from the Font Combo Box widget, the selected font will be applied to the content typed into the Text Edit widget.
How to do it…
Here are the steps to display an active Font Combo Box widget and to apply the selected font to the text written in the Text Edit widget:
- Create a new application of the
Dialog without Buttonstemplate and drag twoLabelwidgets, aFont Combo Boxwidget, and aText Editwidget from theWidgetbox and drop them onto the form. - Set the text property...