Problems with .SetFocus Property

Problems with .SetFocus Property

Post by Christian Flai » Sat, 01 Feb 1997 04:00:00



Hy ALL!

I've probs with the SetFocus-Property...

It doesn't work with text-Fields??

VFP 3.0 under WIN 3.1

Anyone help?

Chris

 
 
 

Problems with .SetFocus Property

Post by Gene Wirchen » Mon, 03 Feb 1997 04:00:00



>Hy ALL!
>I've probs with the SetFocus-Property...

     SetFocus() is a method not a property.

Quote:>It doesn't work with text-Fields??

     It does, but see the docs.  The following is from the VFP5 docs:

     You cannot assign the focus to a control if the controls Enabled
or Visible property is set to false (.F.), or the controls When event
returns false (.F.). If the Enabled or Visible property has been set
to false (.F.), you must first set it to true (.T.) before the control
can receive the focus from the SetFocus method.
     Once a control has the focus, any user input is directed to that
control.

Quote:>VFP 3.0 under WIN 3.1

     I expect it's the same as with VFP5.

Quote:>Anyone help?

     Yes, me.

Sincerely,

Gene Wirchenko

C Pronunciation Guide:
     y=x++;     "wye equals ex plus plus semicolon"
     x=x++;     "ex equals ex doublecross semicolon"

 
 
 

Problems with .SetFocus Property

Post by Geoffrey M Ing » Thu, 06 Feb 1997 04:00:00





>>Hy ALL!

>>I've probs with the SetFocus-Property...

>     SetFocus() is a method not a property.

>>It doesn't work with text-Fields??

>     It does, but see the docs.  The following is from the VFP5 docs:

>     You cannot assign the focus to a control if the controls Enabled
>or Visible property is set to false (.F.), or the controls When event
>returns false (.F.). If the Enabled or Visible property has been set
>to false (.F.), you must first set it to true (.T.) before the control
>can receive the focus from the SetFocus method.
>     Once a control has the focus, any user input is directed to that
>control.

>>VFP 3.0 under WIN 3.1

>     I expect it's the same as with VFP5.

>>Anyone help?

>     Yes, me.

>Sincerely,

>Gene Wirchenko

>C Pronunciation Guide:
>     y=x++;     "wye equals ex plus plus semicolon"
>     x=x++;     "ex equals ex doublecross semicolon"

Do you think that you could outline what your problem is?
There are some quirks with SetFocus() with certain kinds
of controls.  If you don't have time to clarify your question
try reading FxTalk (FoxTalk) June 1996, p.24.  There is an
article there that outlines some possible non-intutiveswith
SetFocus() and also I think some strange behavior.

Geoff

 
 
 

1. DBGrid Problem -- SetFocus Limit

Hello!

I have no problem to setfocus any related-database OCXs except
DBGrid.  The code fragement for setting a focus to the first
column in a data base grid (Apex):

   dbgGrid.Column(0).SetFocus

When the code is compiled and run, the error message says "
No method or properties support for object."  Can you tell me
what code statement to set focus to any column in a db grid?

Thank you, Neil

2. Can a (SQL Server) stored procedure be invoked from access (2.0) env

3. .LostFocus/.SetFocus problem

4. sqlmaint.exe how to restore the output?

5. SetFocus problem with Option Groups

6. Plans for UNICODE

7. SetFocus problem with v3.0b

8. Paradox 8 Reference Manuals

9. Another setfocus problem in VFP 3

10. Problem with SetFocus()

11. FoxPro SetFocus to an Option Group problem

12. SetFocus problem for a form

13. DATAGRID / SETFOCUS