Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Odd form behavior
Message
From
01/10/1998 03:16:43
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
30/09/1998 22:34:02
Chris Crachiolo
Blackmoor Associates Incorporated
New York City, New York, United States
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00141457
Message ID:
00142702
Views:
26
Chris,
If it's a baseclass form (mean default VFP class no subclassing) then you really having bizarre effects that you might need a reinstall. If it's a subclassed form (check in PEM sheet "class"), which I think more likely, some code in init, load etc of it or in one of its parent classes might be changing it.
For a quick check you could open your form in class browser, and hack (change Files of type "Form", select your form, right click on it, select edit parent class, select and view code...).
Cetin

>I did a little debugging and found that the default property *was* being set to .T. -- but by VFP, not by me. I didn't bother to figure out when and where exactly this occurred, but it was set to .F. in the form designer, and there was definitely no code changing it. This form has other bizarre qualities, like the table disappearing from the data environment when I save the form in the Form Designer -- this happenned at least 8 or 9 times! I tried packing the .SCX but it made no difference. Not to mention that when I *intentionally* set the default property to .T. for a button on the other form in the set, it's ignored! I guess I've just stumbled upon some obscure VFP bug triggered by a unique set of circumstances. Maybe it'll disappear when I upgrade to 6.0. -- or maybe it's a feature, not a bug!
>
>
>>Good it's solved Chris. (Now I'm stumped. How could a button that has focus in init could keep focus, after focus moves to another control, w/o default = .t. ). Anyway I think I misread your original posting.
>>Cetin
>>>John, thanks for taking the time to figure this out! And I certainly have no problem with the idea of the find dialog initially popping up -- it's a good one.
>>>
>>>I owe you one. :D
>>>
>>>-- Chris
>>>
>>>
>>>>The problem stems from the cmdFind.SetFocus() in the Form.Init. Once I
>>>>removed that, the Find button remained normal. However, I realize that
>>>>you want the default button to be Find....so...I substituted a
>>>>cmdFind.Click() and the Find form pops up on entry.....once you cancel
>>>>or OK out of that form, the data entry form operates
>>>>normally......so....your two options are to discard the SetFocus or
>>>>replace it with a click()....which is not a bad thing: Most of my data
>>>>entry forms fire a find dialog when you first go in.
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform