{"id":76,"date":"2007-05-12T13:40:24","date_gmt":"2007-05-12T11:40:24","guid":{"rendered":" http:\/\/www.nsonic.de\/blog\/2007\/05\/tedit-doesnt-like-to-launch-a-dialog-fix\/"},"modified":"2007-05-12T13:40:25","modified_gmt":"2007-05-12T11:40:25","slug":"tedit-doesnt-like-to-launch-a-dialog-fix","status":"publish","type":"post","link":"https:\/\/www.nsonic.de\/blog\/2007\/05\/tedit-doesnt-like-to-launch-a-dialog-fix\/","title":{"rendered":"TEdit doesn&#8217;t like to launch a Dialog &#8211; fix"},"content":{"rendered":"<p>TEdit does not like that you launch a dialog box from the OnEnter.<br \/>\nIn D1 you loose the caret and the selection highlighting in any case<br \/>\nIn D4 (not tested inD5) you have a goofing selection when arriving with a mouse click into the Edit :<\/p>\n<p>Drop 2 Edit. In the 2nd OnEnter add :<br \/>\n[code lang=&#8221;delphi&#8221;]                  showMessage(&#8216;hello&#8217;);<br \/>\n[\/code]<br \/>\nLaunch your application and click in the middle of the 2nd Edit text.<br \/>\ntry to type something, and just move your mouse right or left &#8230;. STRANGE!<\/p>\n<p>Workaround:<br \/>\n      Create a user message ( WM_EDITMSG = WM_USER + x), install an event handler which will fire the dialog box, and inside the OnEnter of your Edit do a PostMessage(WM_EDITMSG, 0, 0). The event handler firing the dialog will be executed after the completion of the focusing process of the TEdit.<\/p>\n<p>[tags]Delphi, Components[\/tags]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TEdit does not like that you launch a dialog box from the OnEnter. In D1 you loose the caret and the selection highlighting&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[11],"tags":[90,75],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p71Tml-1e","_links":{"self":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/76"}],"collection":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/comments?post=76"}],"version-history":[{"count":0,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/76\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/media?parent=76"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/categories?post=76"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/tags?post=76"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}