Next: Changing the height Up: Motif Tutorial Previous:

Working with resources

One of the keys to understanding Motif programming is understanding the concept of resources. Every widget in Motif has a set of resources associated with it to control the appearance and behavior of the widget. These resources are just variables (for example, a label widget has resources (or variables) that determine the value of the label, the font used to display the label, the margins around the label, etc.), and these variables can be read or set to new values.

In the program used in tutorials 1 and 2, only one resources was set: the value of the label widget's labelString resource was set to "hello". In this tutorial we will explore some of the other things that can be done by setting and getting resource values.



morbe@enstb.enst-bretagne.fr