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

can't set focus on control - page click fires instead

Status
Not open for further replies.

205xld

Programmer
Jul 26, 2003
22
0
0
GB
I'm up against a tight deadline and completely stuck. Can anyone help?

I have a textbox (txtmanufact) on a page (page1) that I cannot seem to get focus on when running. The control is enabled and shows the tooltip when you mouse over it, but when you try to put the cursor in the textbox the page.click() fires instead. I've turned event tracking on and Mouseenter and Mousemove events fire for the control, but that's all.

The code is complex and legacy, so I've been searching to try to find something that could cause this behaviour - any ideas please?

A sample of the event logging is:
41159.781, claim.pageframe1.page1.txtmanufact.MouseMove(0, 0, 561, 197)
41159.781, claim.pageframe1.page1.MouseMove(0, 0, 561, 197)
41159.781, claim.pageframe1.page1.MouseUp(1, 0, 561, 197)
41159.781, claim.pageframe1.page1.Click()
41159.812, claim.pageframe1.page1.txtmanufact.MouseMove(0, 0, 561, 197)
41159.812, claim.pageframe1.page1.MouseMove(0, 0, 561, 197)
41159.812, claim.Paint()
41162.031, claim.pageframe1.page1.MouseDown(1, 0, 561, 197)
41162.203, claim.pageframe1.page1.MouseUp(1, 0, 561, 197)
41162.203, claim.pageframe1.page1.Click()
 
Is there code in the click() method?


David W. Grewe Dave
 
No, I'm afraid not. I'm using VFP7 - I think bindevent() is on 8 or 9 isn't it?
 
Dave - there is code in the Page1.click() method, but not in the txtmanufact.click()
 
Hi Folks. Panic over - thanks for your help. The solution was straightforward (isn't that always the case?). There was a relation set between the controlsource table of the textbox (a child table) and another master table. I was creating a new record in the master table without a corresponding child record, so in trying to click in the control I was trying to write to a record that wasn't there.

Sorry about that - couldn't see the wood for the trees!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top