` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: EIP required fields and lose focus event
2001-11-26 -- Dennis Evans
 
> !In TakeEvent for First field, after parent call > UPDATE(SELF.Feq) > IF ReturnValue AND ReturnValue ~= EditAction:Cancel > IF ~BRW1.Q.MYF:FirstField > ReturnValue = EditAction:None > ELSIF ~BRW1.Q.MYF:SecondField > ReturnValue = EditAction:Forward > END > END > > The ELSIF part was added to stop it saving if the other field (there are > only 2, and both are required) in my browse was not filled in. > > My problem is twofold. Firstly, I can't trap for loss of focus (i.e. the > user clicking the mouse elsewhere). I want to always save on loss of focus, > so I have this option set, but this then doesn't allow the above code to > run. First move the validation to the ValidateField method. Then in the TakeFocusLoss method, before the parent call, if (Brwx.Primary.Me.ValidateField(Where(Brwx.Q, Brwx.Q.Pre:Field) ) = Level:Notify Self.Again = true Self.ClearColumn() Self.Column = where(Brw1.Q, Brw1.Q.Par:Nomen) Self.ResetColumn() presskey(tabkey) return end That will handle mouse clicks. For the down arrow key the process is about the same except you want to use the TakeAction method, before the parent call and test for EditAction:Next, Previous then set the Action parameter to EditAction:None


Today is April 28, 2024, 7:31 am
This article has been viewed 35111 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: