× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This would work pretty good if I could figure out how to get the row & col
values dynamically for a given input field on the screen.  Then I could
write a procedure to tell me where the field resides on the screen, then I
could use the following code to place the cursor there.  Other wise when you
move your input fields you have to edit the row & col values in your source
code, and I really don't like doing that...

Any suggestions????
tim

> -----Original Message-----
> From: Carol Bastien [SMTP:cabastien@home.com]
> Sent: Thursday, July 15, 1999 7:10 AM
> To:   RPG400-L@midrange.com
> Subject:      Re: Built in Functions
> 
> 
> --------------------------------------------------------------------------
> -
> Hi Dave,
> 
> You may already know this but you can position the cursor w/o an
> indicator.  I'll
> paste a sample of the code here so you can see it.  I've had this sample
> for so long
> I can't remember where I got it originally (probably from Bob Cosi).
> Sorry it's not
> ILE but if you want to use it, you can convert it easily.  Anyway you'll
> get the
> idea.  Not sure it's more efficient than the indicator, but it gives you
> more
> control over the cursor.
> 
> Position Cursor
> 
> DDS Keywords:
>   A                                      CSRLOC(ROW COL)
>   A            ROW            3  0H
>   A            COL             3  0H
> 
> 
> RPG Routines:
>   FDSPF    CF  E                    WORKSTN
>   F                                              KINFDS CSRPOS
>    *
>    * File Information Data Structure to determine cursor position
>   ICSRPOS      DS
>   I                                    B 370 3710SCR
>   I                                    B 382 3830WDW
>    * If not a window, position cursor based on screen location
>   C           WDW       IFEQ *ZEROS
>   C           SCR          DIV  256       ROW
>   C                            MVR            COL
>   C                            ELSE
>    *
>    * Else (a window), position cursor based on window location
>   C           WDW       DIV  256       ROW
>   C                            MVR            COL
>   C                            ENDIF
> 
> - cb
> 
> 
> 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.