Begin by creating a visual part, MyClipboardToolsView, in MyRunSamplePartsApp. After the Composition Editor opens, delete the default Window part on the free-form surface and add a Form part. Next, add the three push buttons so that they line up from left to right. Don't worry about the exact position of the push buttons, because you will set the exact size and position later.
Because the tool bar will be graphical, instead of using text as the label of the push buttons, use icons. Open the settings for each push button and change the label type property to XmICON and the graphics descriptor property to Icon. In the graphics descriptor window, select the filename containing the icon you want to use and the icon ID. For your convenience, abtico50.dll contains a set of icons you can use. The icon IDs for cut, copy, and paste are 695, 694, and 692, respectively. Also, change the part name of each push button to a more meaningful name, such as CutButton, CopyButton, and PasteButton. This will make adjusting the size and position easier.
There are many different ways to control how the push buttons are sized and positioned when the tool bar is sized and positioned. Here are three possibilities:
This approach works better for different display resolutions, but keep in mind that the picture on the push button will not resize with the push button. It will always remain at its normal size, as shown in the following picture:
If you are not familiar with the different kinds of attachment specifications in VisualAge, you should review Sizing and positioning techniques. Then, set the size and position of each push button, open its settings and select the framing spec property.
After you finish, when you resize the clipboard tool bar, the three push buttons will automatically reflow if they need to, to accommodate the icon graphic. You have completed the user interface for the clipboard tool bar. Next, define the public interface for the tool bar.