Re: Putting the cursor in a field [message #5509] |
Wed, 17 January 1996 00:00 |
steinhh
Messages: 260 Registered: June 1994
|
Senior Member |
|
|
In article <19960116.172716.831183.NETNEWS@WVNVM.WVNET.EDU>, mbrown@olie.wvitcoe.wvnet.edu (Myron Brown) writes:
|>
|> Hi. I'm looking for a way to display the cursor inside
|> a field when the field is displayed. I'm using CW_FIELD
|> to create the field. The user has to place the cursor
|> inside the field by clicking the mouse button inside the
|> field. It would be nice if he didn't have to. This seems
|> like an easy thing to do; I just can't find out how. Could
|> someone help me?
|>
Using WIDGET_CONTROL,TEXT_WIDGET_ID,/INPUT_FOCUS sets the
keyboard input focus to the specified text widget (same
effect as clicking inside the field).
In order to get the widget ID of the text widget inside
the compound field widget, the source code indicates the
following should work, (given that FIELD_ID is the Widget
ID of the compound, as returned by CW_FIELD):
LABEL_ID = WIDGET_INFO(FIELD_ID,/CHILD)
TEXT_WIDGET_ID = WIDGET_INFO(LABEL_ID,/SIBLING)
Stein Vidar
|
|
|