Forum Discussion

Geethanjali's avatar
Geethanjali
Occasional Contributor
4 years ago
Solved

Setting the cursor to a specified row and column

Hello

 

I have to set my cursor position to a specific row and column for entering the data in a frame . This is in AS400

I was able to get the current cursor row and column by using cursorCol and cursorRow. 

 

Is there any way to set the cursor to a specific row and column ?

 

Thanks 

S.Geethanjali

  • On your AS400 terminal you select which font you use. Take a fixed font, note the width/height and do simple math.  Beware of screen dpi.

    Y = (Row - 1) * font height +font heigth / 2

    X = (Col - 1) * font width + font width / 2

    Row 3 col 2 and font 8x16 ->  

    Y = 2 * 16 + 8 = 40

    X = 1 * 8 + 4 = 12

    And then do a mouse click on theses coords.

     

2 Replies

  • BenoitB's avatar
    BenoitB
    Community Hero

    On your AS400 terminal you select which font you use. Take a fixed font, note the width/height and do simple math.  Beware of screen dpi.

    Y = (Row - 1) * font height +font heigth / 2

    X = (Col - 1) * font width + font width / 2

    Row 3 col 2 and font 8x16 ->  

    Y = 2 * 16 + 8 = 40

    X = 1 * 8 + 4 = 12

    And then do a mouse click on theses coords.