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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

on selection from combo in grid, move to next cell automatically 1

Status
Not open for further replies.

Rajesh Karunakaran

Programmer
Joined
Sep 29, 2016
Messages
559
Location
MU
Hi Team!

I have a combo box in a grid. The rowsource is a cursor generated in 'When' method through a SELECT statement. I want to move to the next column, ie next cell in same row, when user selects a value from the Combo. But now, after selection control stays with the Combo and I have to press Enter to move to the next column.

Is there any way to move control to next column upon selection form the Combo box?

I tried setting 'SET CONFIRM OFF' but it doesn't have any effect.
May be a 'KEYBOARD {ENTER}' will work, but I am a bit reluctant to use KEYBOARD command as I have to then ensure that it is taken off from the memory that it doesn't go in for another control unexpectedly.
Any straight forward method?

Thanks in advance,
Rajesh
 
KEYBOARD is an option, {TAB] is usually used to go to the next control.
And you can use this.column2.text1.SetFocus()

Bye, Olaf.

Olaf Doschke Software Engineering
 
I forgot to mention you can RETURN 1 in the valid event, too. Or the control you want to set focus to, so RETURN THIS.PARENT.COLUMN2 from grid.COLUMN1.COMBOBOX1.VALID() event. Columns have a Setfocus method and will then automatically forward the focus to their currentcontrol (or dynamiccurrentcontrol), so that's also generally working.

But indeed Return 1 or KEYBOARD '{TAB}' also are most generally correct, as they automatically take into account when controls have set Tabstop=.f., you focus the next control in tab order and respect their tabstop setting.

Bye, Olaf.



Olaf Doschke Software Engineering
 
Hi Olaf,
Thank you for the explanation. I got that "when controls have set Tabstop=.f." scenario!
Rajesh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top