Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Valid Event does not fire when I click outside of the ob
Message
 
 
To
24/09/1998 17:06:59
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00119392
Message ID:
00140773
Views:
37
<snip>

>>another sortof related question. my main focus has been to make sure that validations take place before you save. well now i am having an opposite problem. when the client presses the cancel button an error messagebox pops up. the situation is that the focus is set on a control that has an error condiiton. the client presses the cancel button on the toolbar. the cmdcancel calls a custom method that zaps the grids recordsource (grid is only input, so it is where focus was and what has the error), and then inserts correct records into the grid's recordsource. then i set focus to column1 of the grid. now the messagebox pops up. i believe this is the sequence. can not follow it in the debugger because the debugger takes focus and the messagebox pops up right away. am putting a ton of wait windows in now. any thoughts on this?
>>
>>thanks - brenda

>Make sure that your cancel button has its cancel property set to .T.
This does a couple of things:
clicks the button if the user hits escape, and fills the puts the escape key in LASTKEY() when the cancel button is clicked. Now you have a way of checking if the user is trying to cancel out of the edit.

>In your valid events, bypass all checking code if LASTKEY = 27.

>IF LASTKEY() = 27
> RETURN .T.
>ENDIF

>Erik Moore


hope i am not pestering you. but your replies have really helped me. now two more (hopefully the last on this subject)..

1. problem when focus is in the grid, and the client clicks to another control outside the grid. the grid1.text1.valid is executed, and if in error, a messagebox pops up. but focus does not stay in the grid, even if its' valid return .f.. what is a fix?

2. have containers on a page. when the client clicks the EDIT button all the page tabs are disabled execpt the active page. the active page stays enabled for readability. if the client clicks on the activepage, pagetab, (just the pagetab, not the page. i really have no page for them to click on, my container is as large ast the page) again a messagebox popups if the field is in error. but again, focus does not stay with the erroneous control. focus is set to the pagetab. have any ideas?

thanks for your help - brenda
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform