General information
Category:
Coding, syntax & commands
>>I seem to have the opposite problem of several I've seen relating to the default button: namely, I intentionally begin with default set to .F. for all my buttons, but then when then in the Activate of a page on my page frame, want to set the save button .T. so that Enter works in typical Windows behavior (I want to be able to set the default to one button on page 1 and a different when I click on page 2). Problem is, I can't get it to work, i.e. I set the button's default property to .T., then checked the value which shows as .T., but it doesn't 'work as coded'. I've tried refreshing the page the button is on, and the form, to no avail.
>>
>>Any ideas on this?
>>
>>Thanks,
>>
>>Sylvia
>
>In VFP5.0/5.0a there is a known bug, where a call to any GotFocus method on a form resets the Default property of command buttons back to the original state (MS ref. PSS Id Q190567 dated 8/7/98). (I seem to have had a similar problem with the setFocus method too)
>
>MS recommend saving the state of the Default property for all buttons, prior to a call to DoDefault() in GetFocus & then resetting the state as required. Its the intrinsic (default) GetFocus function that causes the problem - there's no mention of what happens if NoDefault is used - that might be worth trying.
>
>
>hth
>
>Paul
In looking through my code, I'm not calling any gotfocus methods prior to trying to set the default button property, so this may not be related to my problem. But I'll take a look at that article.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only