Mauri Posted October 15, 2016 Share Posted October 15, 2016 I made a new component inherited from TUniEdit and would like to implement their own validation on the server side. Then on the server side when the onExit event is fired I want to validate some information and when some data is different from what I'm hoping I want the component stay with the red border showing that it is invalid. When invalid component should show the same color as the TUniNumberEdit component displays when the entered value is less than the MinValue property. unit ISComponetField; interface uses Classes, Vcl.Graphics, DesignIntf, Controls, DBCtrls, DB, UniGUIClasses, UniGUIInterfaces, uniGUICoreInterfaces, UniGUITypes, UniEdit; type TISField = class(TUniEdit) private ... procedure getExitEdit(Sender: TObject); ... protected procedure LoadCompleted; override; public ... published ... end; procedure Register; implementation procedure TISField.getExitEdit(Sender: TObject); var bValidate: boolean; begin bValidate:= true; // Here I will do all my validations ... if not bValidate then begin // Here I would like to call a method or change a property to display the field with a red border end; end; procedure TISField.LoadCompleted; begin inherited; OnExit:= getExitEdit; end; ... Best Regards, Mauri Member ID: 00404 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.