IT lexicon › Programming › XmArrowButton

XmArrowButton

Programming På svenska → Updated: 2026-10-11

A Motif button with no label, just a bevelled triangle pointing one of four ways.

The direction comes from XmNarrowDirection — XmARROW_UP, XmARROW_DOWN, XmARROW_LEFT or XmARROW_RIGHT — and otherwise the widget behaves like an XmPushButton: arm, disarm and activate callbacks, plus a gadget version, XmArrowButtonGadget, for anyone counting windows. The triangle uses the same shadows as everything else in Motif and looks pressed in while the mouse button is held.

Its classic use was the home-made counter: a text field with two arrow buttons beside it and a callback that incremented or decremented. That is how numeric fields were built in Motif applications until XmSpinBox arrived in Motif 2.0 and made the contraption unnecessary. XmScrollBar, on the other hand, uses no arrow buttons at all — it draws its own arrows, which is why the two rarely look quite the same.

← Back to the lexicon