|
Hi,
the current row and column of the cursor are stored in the file status
datastructure, position 370 (row) and 371 (column) as binary value.
In your case you should use the field name in the DDS to show the correct
list and the row and columns for to reposition your cursor:
1. DDS
A RTNCSRLOC(&CSFMT &CSFELD)
A CSRLOC(CSROW CSCOL)
A CSFMT 10A H TEXT('Format-Name')
A CSFELD 10A H TEXT('Feld-Name')
A CSROW 3S 0H TEXT('Cursor-Zeile für Position.')
A CSCOL 3S 0H TEXT('Cursor-Spalte für Position.')
2. RPG
FDspFileF CF E WORKSTN INFDS(SAVINF)
D SAVINF DS
D RowHex 370 370I 0
D ColHex 371 371I 0
/Free
Select;
When AidCode = F04; //Function-Key F4=MachtCode
Select;
When CSFMT = 'FORMAT1' and CSFELD = 'F1FLD1';
exsr MCFld1;
When CSFMT = 'FORMAT1' and CSFELD = 'F1FLD2';
exsr MCFld2;
// and so on
EndSL;
CsRow = RowHex;
CsCol = ColHex;
EndSL;
Birgitta
-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]Im Auftrag von Luqman
Gesendet: Freitag, 16. Dezember 2005 15:33
An: rpg400-l@xxxxxxxxxxxx
Betreff: Knowing cursor position (row,column) of Screen ?
How can I know, which row/column the cursor is ? I want to retrieve the
current field name on which the cursor is, so that I can display list of
that field.
For example:
I have one record format with 02 fields, supplier and location, if cursor is
on supplier field and user press F4, supplier list should be appear, if
cursor is on location field, and user press F4, the location list should be
appeard.
Best Regards,
Luqman
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.