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

PB6.5 - Setting Focus to new row added in user object - not working!!

Status
Not open for further replies.

kaul125

Programmer
Jan 29, 2002
87
US
I have a user object with a number of different tabs. Each tab has a datawindow attached to it. This user object is placed on a window with a command button. The purpose of the button is to add a row to the current tab's datawindow. I want to have the cursor automatically placed in the new row.

I have a object function for the user object that is called from the command button, add. The code is as follows:

idw_dw[il_newindex].scrolltorow(idw_dw[il_newindex].insertrow(0))
idw_dw[il_newindex].setfocus()

When I click on the add button, focus is set in the new row just added for some of the datawindow. However, the other datawindows, focus is not set in the new row just added.

Does anyone know why it works for some datawindows and not the others? How can I fixe this problem?

Thanks

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top