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

SetFocus Problems

Status
Not open for further replies.

SIG357

Programmer
Jun 29, 2000
164
US
Im trying to create a user-editable flex grid.&nbsp;&nbsp;I can get the text box to set up perfectly sized, but when I try to set focus to it (Text1.SetFocus) I get an &quot;Invalid Procedure Call&quot; error (#5).&nbsp;&nbsp;Any easy fixes for this?<br>Thanks in advance<br><br>joe
 
Joe,<br><br>First, I don't think that you can setfocus to an object in the form-load if that is what you are trying to do.<br><br>Maybe what you could do is load the form and then wait for the User to click a cell and then using the mouse events and properties, figure out which cell you are actually over.&nbsp;&nbsp;Then you can move the textbox there make it visible etc. and then setfocus<br><br>Secondly make sure that your textbox is enabled and visible.<br><br>See if any of those suggestions work.
 
<br><br>&nbsp;&nbsp;&nbsp;Could you possibly set the TabIndex to (0) to show focus on the specific textbox in question? Then just reset the TabIndex to the new box as the user progresses.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hope this helps,<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;John Stephens
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top