Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!flood!chris From: chris@flood.com (Chris Newton) Newsgroups: comp.windows.x Subject: Coercing chars in XView panel text items? Message-ID: <1991Feb9.023123.891@flood.com> Date: 9 Feb 91 02:31:23 GMT Sender: root@flood.com (Operator) Organization: The Flood Group, Inc. Lawndale, Ca. Lines: 36 I'm trying to implement a capability in which certain text items in a given XView panel coerce user input to a particular case. For example, if the item is "upper-case only", I want all lower-case letters typed to be coerced to upper-case when entered into the item. I've attempted to modify the XView event structure (NOT the raw XEvent structure) in my text notify procedure as follows: char c = event_action(event); ... if (islower(c)) { event_set_id(toupper(c)); } ... return (PANEL_INSERT); This has no effect - the original character shows up in the item. I've checked the event structure before and after and all fields look kosher. Obviously, the text item package isn't using the modified event structure when my notify proc. returns. Any thoughts? Can this be done in a device-independent way without hacking the text item package? (I'd rather not try tweaking the XEvent structure, since this keycodes are so device-dependent.) Thanks in advance. -Chris -- Chris B. Newton The Flood Group, Inc. Lawndale, Ca. Internet: chris@flood.com (213) 219-1155 UUCP: ...!uunet!flood!chris