Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!resq!Uucp From: Uucp@resq.fidonet.org (Uucp) Newsgroups: comp.windows.x.motif Subject: Re: Unwanted autoscrolling in List widget. Message-ID: <46.27F09973@resq.fidonet.org> Date: 26 Mar 91 17:59:53 GMT Organization: RES-Q, Paterson NJ (201) 881-7421 Lines: 49 From uunet!osf.org!motif-talk-request From: uunet!osf.org!meeks (W. Scott Meeks) To: beaver@logm.se (Per Beremark) Date: Tue, 26 Mar 91 09:14:46 EST Cc: motif-talk@osf.org >Date: Tue, 26 Mar 91 14:58:23 +0100 >From: beaver@logm.se (Per Beremark) > >I have stumbled over a problem with the scrolling mechanism vs. >callbacks in the ListWidget. I'm not sure weather this is a bug and >should result in a bugreport, or merely a feature, wish i have to >live with. > >My application have a long list with items (BROWSE_SELECT). >When I select one of them (single or double click) I do some action. >This action can result in a MessageBox for the user to respond to. >When he moves the pointer outside the listwidget it starts to scroll >until the end of the list. This is also leads to the fact that the >selected item in the List is not the same item I have answered the >MessageBox about. > >It all happens because the callback is called on the button1 down >event. This starts the MessageBox. The listwidget then doesn`t know >that the mouse-button is released, and when you leave the listwidget >it gets a leavenotify which activates a timeout for scrolling. > >One way to get around this is to ignore the listcallbacks and use your >own eventhandler, but this feels unsatisfactory. > >Have I missed something. Am I doing the right thing, or is this a bug >i should report? It sounds to me like you have XmNautomaticSelection set to True. This means that the callback is called as soon as and every time you enter a new item with button 1 down. Try setting XmNautomaticSelection to False. This will cause the callback to not be called until the user releases the mouse button. W. Scott Meeks | We must live with the fact, true throughout recorded Open Software Foundation | history, that our artifacts are sometimes flawed and meeks@osf.org | cause us to die in novel and unexpected ways, and we (617) 621-7229 | can only do our human best to minimize the problems. -- Uucp - via FidoNet node 1:269/133 UUCP: uunet!resq!Uucp