Bernie07 Posted May 29, 2017 Share Posted May 29, 2017 Hello, I have a component of the class TUniHTMLMemo. If I'm using the SetFocus method in OnShow of the form, it works. But if I'm using the SetFocus for example in OnKeyPress of another Control nothing happens. This is the Code : procedure TFormKDMonPersonaldienstleisterMitteilung.EinBetreffKeyPress( Sender: TObject; var Key: Char);begin if key=#13 then MemMitteilung.SetFocus;end; With all other UniGui controls it works within the OnKeyPress Event. Only the TUniHTMLMemo has a Problem. Best wishes Bernhard Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 29, 2017 Share Posted May 29, 2017 Hi, Which build, browser are you using ?! Also you can try to use this: UniHTMLMemo1.JSInterface.JSCall('focus', []); Best regards, Quote Link to comment Share on other sites More sharing options...
Bernie07 Posted May 29, 2017 Author Share Posted May 29, 2017 Thanks for your answer. Yes, this code works fine. So the problem is for me solved. My browser is Google Chrome (latest build). But with Firefox there is the same Problem. The build of uniGui is 1.0.0.1368 Best wishes Bernhard Quote Link to comment Share on other sites More sharing options...
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.