Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!jpl-devvax!david From: david@jpl-devvax.JPL.NASA.GOV (David E. Smyth) Newsgroups: comp.windows.x.motif Subject: Re: 'tick marks' in XmScale Widget? Message-ID: <8962@jpl-devvax.JPL.NASA.GOV> Date: 1 Aug 90 19:25:48 GMT References: <2676@network.ucsd.edu> <5686@hplabsz.HPL.HP.COM> Reply-To: david@jpl-devvax.JPL.NASA.GOV (David E. Smyth) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 46 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." -------------------------------------------------------------------------