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

Buttons in Table Frame UIObjects

Status
Not open for further replies.

RyanSM

Programmer
Oct 18, 2006
1
US
I have a Table Frame (TF) object on a Form. The TF has multiple columns all but one containing fields in the underlying table. The extra column contains a Button object, with some ObjectPAL code attached to the pushButton() event. When the TF fills with the data from the table, all rows with data contain the Button object. Everything OK to this point.

My problem is that when a user has focus on say row 1 of the TF and uses the mouse to click on the button in row 2 of the TF the focus does not shift to row 2 but stays on row 1. This is a problem for me in that the code attached to the button is relying on the reading the values in the row and have them associated to the same row as the button press.

The most frustrating part is that the occurrence seems random (i.e. it doesn't happen every time). It seems to be timing related(?) I have tried putting doDefaults and MoveTo() in the button OPal but they seem to have no effect.

Can anybody suggest a way for me to structure the UIObjects or OPal to make this reliable?

Thanks in advance.
 
I've done things like this, and I had one button not in the table frame or on a new row, depending on the button's function. That button always worked on the row that had the focus. I felt this reduced confusion.
 
Let me try that again...

I've done things like this, and I had one button not in the table frame, depending on the button's function. That button always worked on the row that had the focus or on a new row. I felt this reduced confusion.
 
One more time, gah, I was out of it when I posted that!

I've done things like this, and I had one button not in the table frame. That button always worked on the row that had the focus or on a new row, depending on the button's function. I felt this reduced confusion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top