Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to test at what line of an editbox the cursor is 1

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi!
I like to use the arrow up/dwn key to navigate throught the controls on a form.
That's no problem with textboxes but, once in an editbox the cursor remains at the upper row (once the arrow-up key hes been pressed). So I'd like tot know if there is a way to detect that the cursor is in th eupmost row to force the cursor to move to the previous control.
Is there a way to manage this?
-Bart
 
Editbox.Selstart would be 1 when the cursor is at the beginning of field, wouldn't it?
 
Danfreeman,

That's through, but the cursor may be e.g. at position 25.
If you want to leave the editbox than, using up-arrow key it's impossible.
So, I don't know if possible, once you need the cursor is somewhere at row 1 you can force the leave that edtbox and skip back to another control.

-Bart
 
Hi Bart,

why make everythig different than standard windows behaviour. TAB and SHIFT+TAB are for navigating controls. You may use the editbox keypress and translate array up/down through SHIFT+TAB or TAB, then this would also work, but you'd have no way to navigate through the lines of an editbox then.

Bye, Olaf.
 
Olaf,

'why make everythig different than standard windows behaviour'

Just request of the users....

-Bart
 
you could use interactivechange and row(), col() functions. Then when you press North Arrow and the Row() does not change, then you can take appropriate action. Row() and Col() are for backward compatiblity but still work. you could use object.currentX, object.currentY properties instead.

try it.

Nasib Kalsi

 
Nasib,

Thanks for your reply.
This is indeed a way to solve this issue I can work further on.

-Bart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top