bni@modulex.dk (Bent Nielsen) (02/13/91)
Hi netlanders, Can anyone help me with a translation problem. I am running X11R4 patchlevel 18 and Motif 1.1 on DECstation 2100 and 3100. I want the following actions on a widget: 1) when button 1 is pressed 2) when button 1 is pressed and moved 3) when button 1 is released 4) when button 1 is pressed two or more time (double click) 5) when button 1 is released two or more time (double click) 6) and all motions Actions 1, 2, 3 and 6 is working when I use the following translation: static char defaultTranslations[] = "\043override\n\ <Btn1Down>: ButtonDown()\n\ <Btn1Motion>: ButtonMotion()\n\ <Btn1Up>: ButtonUp()\n\ <Motion>: ButtonMotionAll()\n\ "; but when I use the translation shown below only action 1, 4 and 5 is working correctly. Unless I press button 1 outside the widget and then release it inside, action 3 and 6 isn't working. (I will get action 3 when releasing and action 6 is then working). Action 2 will never work. static char defaultTranslations[] = "\043override\n\ <Btn1Down>: ButtonDown()\n\ <Btn1Motion>: ButtonMotion()\n\ <Btn1Up>: ButtonUp()\n\ <Btn1Down>(2+): ButtonDoubleClickDown()\n\ <Btn1Up>(2+): ButtonDoubleClickUp()\n\ <Motion>: ButtonMotionAll()\n\ "; I know about event handlers, but I would like to use translations instead, if that's possible. -- Bent Nielsen <bni@modulex.dk> A/S MODULEX Phone: +45 44 53 30 11 Lyskaer 15 Telefax: +45 44 53 30 74 DK-2730 Herlev Denmark