cancel
Showing results for 
Search instead for 
Did you mean: 

Setting the cursor to a specified row and column

SOLVED
Highlighted
Occasional Contributor

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Leader

Re: Setting the cursor to a specified row and column

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.

 

Un sourire et ça repart

View solution in original post

2 REPLIES 2
Highlighted
Community Leader

Re: Setting the cursor to a specified row and column

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.

 

Un sourire et ça repart

View solution in original post

Highlighted
Community Manager

Re: Setting the cursor to a specified row and column

Thanks a lot Benoit🙂

 

@Geethanjali was this helpful to you?


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors