Next: ScrolledWindow and ScrollBar Widgets Up: Scale Widgets Previous: The scale.c program

Scale Style

The Motif Style guide suggests that some sort of markers are used to gauge distance along a Scale. An assortment of labels and tics can be used to provide some sort of visual ruler (Fig. 21).

Fig. 21 Output of scale1.c

The scale1.c program achieves this by placing ``'' labels at equally spaced intervals. Apart from this it is identical to scale.c.

Widget ...,tics[1];



/* label scale axis */
    for (i=0; i < 11; ++i )
      {  XtSetArg(args[0], XmNseparatorType, XmSINGLE_LINE);
         XtSetArg(args[1], XmNorientation, XmVERTICAL);
         XtSetArg(args[2], XmNwidth, 10);
         XtSetArg(args[3], XmNheight, 5);
         tics[i] = XmCreateSeparatorGadget(scale, "|", 
                 args, 4);
    XtManageChildren(tics, 11);

Tue May 24 16:52:56 BST 1994