Note that there are some explanatory texts on larger screens.

plurals
  1. PORichEdit VCL and URLs. Workarounds for OnPaint Issues
    primarykey
    data
    text
    <p>My issue is with the thing Delphi progies scare to death - Rich Edit in Windows (XP and pre-XP versions).</p> <p>Situation:</p> <p>I have added EM_AUTOURLDETECTION in OnCreate of form. Target -> RichEdit1. Then, I have form, that is "collapsed" after showing form. RichEdit Control is sattic, visible and enabled, but it is "hidden" because form window is collapsed. </p> <p>I can expand and collapse form, using Button1 and changing forms Constraints and Size properties.</p> <p>After first time I expand form, the URL inside RichEdit1 control is highlighted. But, after second, third, fourth, etc... times I collapse and expand form, the RichEdit1 Control does not highlight URL anymore.</p> <p>I have tried EM_SETTEXTMODE messages, also WM_UPDATEUISTATE, also basic WM_TEXT message -> no luck. It sems like this merssage really works ( enables detection ) while sending keyboard strokes ( virtual keycodes ), but not when text has been modified. Also - I am thinking to rewrite code to make RichEdit Control dynamic. Would this fix the problem?</p> <p>Maybe solution is to override OnPaint / OnDraw method to avoid highlight ( formatting ) losing when collapsing or expanding form?</p> <p>Weird is that my Embarcadero Documentation says this function must work in any moment text has been modified. Why it does not work?</p> <p>Any help appreciated. I am making this Community Wiki because this is common problem and togewther we cam find solution, right? :)</p> <p>Also - follow-ups and related Question:</p> <p><a href="https://stackoverflow.com/questions/738694/override-onpaint">Override OnPaint</a></p> <p><a href="https://stackoverflow.com/questions/478071/how-to-autodetect-urls-in-richedit-2-0">How to autodetect urls in RichEdit 2.0?</a></p> <p><a href="http://www.vbforums.com/archive/index.php/t-59959.html" rel="nofollow noreferrer">http://www.vbforums.com/archive/index.php/t-59959.html</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload