Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preventing duplicate entries
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00118204
Message ID:
00121383
Views:
17
>Your code is not forcing the valid before I leave the control on the form. I have placed this code in several places but since, as you said, toolbars NEVER get focus it makes matters more complicated. I am placing the code in a toolbar button's click event now.
>
>The bottom line I cannot find how to get the valid to fire when moving of a form control onto the toolbar. The funny thing is that I have set step on in toolbar button's click event and the valid fires then.
>
>IMHO, VFP is pathetic in this regard. The toolbar is almost useless because of this. Along these lines I have had to use a program called savebuff, written by Michel Fournier, in order to save the value in the control before moving to a tool bar button.
>
Richard,

You may find this behavior of toolbars useless, but if you were using a toolbar button for cut/copy/.and paste you would be really glad that the control doesn't give up focus. Toolbars and menus never get focus. I don''t why the coide I posted for you didn't work, it is all my toolbar methods. I never do anything in the button's click other than calling a method of the toolbar.

The save button in the toolbars has this code;

THIS.Parent.DoSave()

The toolbar has this code in it;
IF TYPE("oCreator.oForm.ActiveControl.Name") = "C"
   IF PEMSTATUS(oCreator.oForm.ActiveControl,"Setfocus",5)
      oCreator.oForm.ActiveControl.SetFocus()
   ENDIF
ENDIF
oCreator.oForm.DoSave()
oCreator is the app object which I store in a property of every form and toolbar.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform