[futurebasic] Re: [FB] Simple Edit Field question...

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 1999 : Group Archive : Group : All Groups

From: Rick Brown <rbrown@...>
Date: Sun, 30 May 1999 20:21:35 -0500

Sean -G3- wrote:

> I just want to know how to set the active edit field. I need to do this
> so I can insert text in it using TEKEY. I know I can use WINDOW(_efnum)
> or something to get the current edit field, I just don't know how to set
> it.
>
> I have a static edit field, which will get kinda long. I need to:
> 1) Activate that edit field.
> 2) Set the cursor to the bottom
> 3) Insert text using TEKEY.
>
> "WINDOW(_efnum) = 1" gives me an error.
> I know how to do numbers 2 & 3, I think...

This statement makes edit field #efID become the active edit field:

  EDIT FIELD efID

(that was easy, huh?)

If efID was a static field (as you indicate), the above statement will also
turn it into an editable (non-static) field.  At that point, you can set the
insertion point to the bottom using SETSELECT 32767,32767.  Then you can use
TEKEY$ to insert the new text.

Although you didn't say it, my guess is that you next want the field to become
static again.  This is a 2-step process:
* First, inactivate the field, either by executing EDIT FIELD 0, or by
activating a different field in the window.
* Then, set your efID field to a static type, as in this example:
     EDIT FIELD efID,,,_statFramed
  (you can also use _statNoFramed, or any of the other static types)

Hope this helps.
- Rick