[comp.windows.x.motif] 'tick marks' in XmScale Widget?

pbiron@weber.ucsd.edu (Paul Biron) (07/29/90)

Hi all,

On page 2-13 of _HP OSF/Motif Programmer's Guide_
(September 1989.......Edition 1) it says:

"A Scale can also have a set of labels and 'tick marks'
located outside of the Scale region.  These can be
used to indicate the relative value at various points
along the scale."

We have Motif 1.0.

I can't find the resources to use to set these
'tick marks' anywhere.  I've looked in Xm.h,
Scale.h, ScaleP.h, the man pages online and
_HP OSF/Motif Programmer's Reference_.

Can anyone tell me if the above lines from the
_Guide_ are a lie??  Could it be that there is
a "feature" documented which doesn't really exist :-?

Any help would be appreciated,

Paul Biron      pbiron@ucsd.edu        (619) 534-5758
Central University Library, Mail Code C-075-R
Social Sciences DataBase Project
University of California, San Diego, La Jolla, Ca. 92093

mayer@hplabsz.HPL.HP.COM (Niels Mayer) (07/31/90)

In article <2676@network.ucsd.edu> pbiron@weber.ucsd.edu (Paul Biron) writes:
>On page 2-13 of _HP OSF/Motif Programmer's Guide_
>(September 1989.......Edition 1) it says:
>
>"A Scale can also have a set of labels and 'tick marks'
>located outside of the Scale region.  These can be
>used to indicate the relative value at various points
>along the scale."
>
>We have Motif 1.0.
>
>I can't find the resources to use to set these
>'tick marks' anywhere.  I've looked in Xm.h,
>Scale.h, ScaleP.h, the man pages online and
>_HP OSF/Motif Programmer's Reference_.

Just create label widgets as children of the scale widget..., eg:

| (setq scale0_w 
|       (send XM_SCALE_WIDGET_CLASS :new :managed "scale" rc_w
|             :XMN_TITLE_STRING "Utterness\nCoefficient"
|             :XMN_SENSITIVE t
|             ))
| (send XM_LABEL_WIDGET_CLASS :new :managed "100" scale0_w
|       )
| (send XM_LABEL_WIDGET_CLASS :new :managed "50" scale0_w
|       )
| (send XM_LABEL_WIDGET_CLASS :new :managed "0" scale0_w
|       )

(it should be obvious how to translate the above WINTERP code into C or UIL
syntax).

>Can anyone tell me if the above lines from the
>_Guide_ are a lie??  Could it be that there is
>a "feature" documented which doesn't really exist :-?
>

Not a lie, but the next best thing -- badly documented.

-------------------------------------------------------------------------------
	    Niels Mayer -- hplabs!mayer -- mayer@hplabs.hp.com
		  Human-Computer Interaction Department
		       Hewlett-Packard Laboratories
			      Palo Alto, CA.
				   *

david@jpl-devvax.JPL.NASA.GOV (David E. Smyth) (08/02/90)

mayer@hplabs.hp.com (Niels Mayer) writes:
}pbiron@weber.ucsd.edu (Paul Biron) writes:
}>
}>"A Scale can also have a set of labels and 'tick marks'
}>located outside of the Scale region.  These can be
}>used to indicate the relative value at various points
}>along the scale."
}
}Just create label widgets as children of the scale widget..., eg:
}
}| (setq scale0_w 
}|       (send XM_SCALE_WIDGET_CLASS :new :managed "scale" rc_w
}|             :XMN_TITLE_STRING "Utterness\nCoefficient"
}|             :XMN_SENSITIVE t
}|             ))
}| (send XM_LABEL_WIDGET_CLASS :new :managed "100" scale0_w
}|       )
}| (send XM_LABEL_WIDGET_CLASS :new :managed "50" scale0_w
}|       )
}| (send XM_LABEL_WIDGET_CLASS :new :managed "0" scale0_w
}|       )
}
}(it should be obvious how to translate the above WINTERP code into C or UIL
}syntax).

If you are using Mri, here is a stand-alone UI which is
the equivalent:

Mri.wcChildren:       scale

*scale.wcClassName:   XmScale
*scale.orientation:   HORIZONTAL
*scale.titleString:   Utterness Coefficient
*scale.wcChildren:    100, 50, 0
*scale*wcClassName:   XmLabel

-------------------------------------------------------------------------
David Smyth				david@jpl-devvax.jpl.nasa.gov
Senior Software Engineer,		seismo!cit-vax!jpl-devvax!david
X and Object Guru.			(818)393-0983
Jet Propulsion Lab, M/S 230-103, 4800 Oak Grove Drive, Pasadena, CA 91109
--------------------------- Quote of the Day: ---------------------------
   "A Guru is not one who simply knows all the answers.  Rather, a
    Guru is like one who walks among the mountains, and by wandering
    around abit, can see the horizon through long narrow canyons."
-------------------------------------------------------------------------