Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!ucbvax!MN.ECN.PURDUE.EDU!tongz From: tongz@MN.ECN.PURDUE.EDU (Tong Zheng) Newsgroups: comp.windows.x Subject: Problems on changing borderWidth in Athena text widget & using accelerators focusing input Message-ID: <9007021835.AA06703@mn.ecn.purdue.edu> Date: 2 Jul 90 18:35:38 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: General Consultant, ME Comp. Lab Lines: 55 I need help on problems I have when I program using Athena Text Widget and accelerators. The first one is trivial: I am writing a program using Athena Text Widget running with X11R4 on a SUN 4. I creat a text input window using asciiTextWidget with type "string", and like to have the borderwidth changed whenever the cursor moves in/out the window. Because there is no such a default action function in Text Widget, I make my own globe action function to change the borderwidth resource by using XtSetValues. But it does not do anything to the window. Did I use the wrong function here? I tried to apply the same way to other widgets, such as Command(I am using extension sharp style, the highlight() function does not work by default), I got the same result. Strange thing is if I change the background value instead of changing borderwidth, it does work. The second problem is about using accelerator: I have several text widgets created from a form widget. Each text widget is a input window receiving usr input. Whenever usr press Button1 on one of the text window, I like to have this window selected, and all input focus on this window(means the cursor can be anywhere in the form widget, even in other text window, whatever the user types all goes to the window selected). Because user can choose any one of text windows, I do the focus selection in a action function when user press left mouse button. In this action function, I treat the selected window as accelerator source widget, any other text windows and form widget is destination widget. I do XtInstallAllAccelerators(... for the first one selected, it works fine. But when second, third, etc is selected, the focus is still on the first one selected. It seems the accelerators installed by the first one still have effect on rest of the widgets, and in the high priority. I could find any function to release/destroy added accelerators. Any hints and suggestions about this problem? Any help is appreciated!! P.S: Any response can be either sent to me via e-mail or posted on the newgroup. I will put the summary on the newsgroup if there is a such need. --- | Zheng, Tong | major: Computer Science | | - student programmer, Mechanical Eng., Purdue University| | ARPA: tongz@mn.ecn.purdue.edu BITNET: xdpc@puccvm.BITNET| ------------------------------------------------------------ *Ask me who is going to win the World Cup??????????????? *germany, germanY, germaNY, germANY, gerMANY, geRMANY, gERMANY!