Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!dkuug!modulex!bni From: bni@modulex.dk (Bent Nielsen) Newsgroups: comp.windows.x.motif Subject: Re: Cursors and buttons...... Message-ID: <710@modulex.dk> Date: 26 Jan 91 12:05:06 GMT References: Distribution: inet Organization: A/S MODULEX, Copenhagen, Denmark Lines: 34 dow@PRESTO.IG.COM (Christopher Dow) writes: --- stuff deleted --- >When the mouse is over the editing area, I set the cursor to be an >i-beam. When it's not I set the cursor to be an arrow. The only >problem is, that I don't get informed when the mouse moves over the >scroll bars or the button, so if it moves from the editing area to the >scroll bars, it stays an i-beam, which looks kind of silly. Is there >any way to set the cursor for the button & scroll bar widgets? From >reading the documentation, it doesn't look like XmNarmCallback, >XmNactivate Callback, or XmNdisarmCallback will do this for me. Also, I >can't see where there is a resource for a PushButton or ScrollBar widget >that sets the cursor. --- stuff deleted --- The way to be informed when the mouse moves over a widget, is to "receive" events for ENTER and LEAVE. The ENTER event is when the mouse enter a widget and LEAVE is when the mouse leave the widget. You can ether add a event handler or a translation to the widget (the scroll bar or the push button). Look in your manual on XtAddEventHandler or about translations. The callbacks for XmNarmCallback and XmNdisarmCallback will only be called when you Press or Release the button on the mouse. -- Bent Nielsen A/S MODULEX Phone: +45 44 53 30 11 Lyskaer 15 Telefax: +45 44 53 30 74 DK-2730 Herlev Denmark