RobYost Posted August 26, 2017 Posted August 26, 2017 I would like to create a control with TUniEdit as its ancestor. I would like it to SelectAll when the user clicks or tabs to it. TUniRyEdit = class(TUniEdit) private protected procedure GotFocus (var Msg: TMessageEvent); message CM_GOTFOCUS; public published end; procedure Register; implementation { TUniRyEdit } procedure Register; begin RegisterComponents('UniYostPak', [TUniRyEdit]); end; { TUniRyEdit } procedure TUniRyEdit.GotFocus(var Msg: TMessageEvent); begin SelectAll; end; end. But the SelectAll is never called. Is there a better way to accomplish this? I don't want to add code to every edit control to selectall when it receives focus Quote
Sherzod Posted August 27, 2017 Posted August 27, 2017 Hi, You can use selectOnFocus config for this: JSConfig('selectOnFocus', [True]); Best regards, Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.