trichview.support
Re: Hyperlink Problem |
Author |
Message |
Sergey Tkachenko |
Posted: 04/07/2004 10:44:09 A simple idea - to terminate hyperlinks when user presses space. Add this code in OnKeyPress: procedure TForm3.RichViewEdit1KeyPress(Sender: TObject; var Key: Char); var rve: TCustomRichViewEdit; begin if (Key=' ') and (RichViewEdit1.CurTextStyleNo=RichViewEdit1.CurItemStyle) and RichViewEdit1.Style.TextStyles[RichViewEdit1.CurTextStyleNo].Jump and (RichViewEdit1.Style.TextStyles[RichViewEdit1.CurTextStyleNo].NextStyleNo>=0 ) and not RichViewEdit1.SelectionExists then begin rve := RichViewEdit1.TopLevelEditor; if rve.OffsetInCurItem>=rve.GetOffsAfterItem(rve.CurItemNo) then rve.CurTextStyleNo := RichViewEdit1.Style.TextStyles[RichViewEdit1.CurTextStyleNo].NextStyleNo; end; end; This code assumes that hyperlink's original text style is saved in NextStyleNo property (RichViewActions do it) |
Powered by ABC Amber Outlook Express Converter