AndrewMozley
Programmer
Feel that this has been asked before, but I don't have a complete solution.
I have a textbox, MyText on form Form1 with a Lostfocus() method which checks to see whether it likes Mytext.value. If it does not, it retains control. However there are circumstances in which I do not want this check to be run, for example if the user clicks on my "Close" button.
To cope with that, I have a flag "Fire_Lostfocus", normally set to .T. Then in the Close.MouseEnter() method I set that flag to .F., and on Close.MouseLeave() I set that to .T.
And this allows me to bypass the code in Textbox.LostFocus.
However there are other cfircumstances in which I also want to allow control to move away from Mytext, without complaint. If for example I have another form, Form2 on the screen at the same time, I want to allow the user to click on Form2, without getting a complaint from Form1.Mytext.Lostfocus().
Grateful for ideas. Andrew
I have a textbox, MyText on form Form1 with a Lostfocus() method which checks to see whether it likes Mytext.value. If it does not, it retains control. However there are circumstances in which I do not want this check to be run, for example if the user clicks on my "Close" button.
To cope with that, I have a flag "Fire_Lostfocus", normally set to .T. Then in the Close.MouseEnter() method I set that flag to .F., and on Close.MouseLeave() I set that to .T.
And this allows me to bypass the code in Textbox.LostFocus.
However there are other cfircumstances in which I also want to allow control to move away from Mytext, without complaint. If for example I have another form, Form2 on the screen at the same time, I want to allow the user to click on Form2, without getting a complaint from Form1.Mytext.Lostfocus().
Grateful for ideas. Andrew