Page 1 of 1
URL with Ctrl in RichView
Posted: Wed Jul 28, 2010 9:47 am
by monsoon
Sergey Tkachenko wrote:In a read-only editor, hypertext works automatically, without Ctrl. Only when editing, it requires pressing and holding Ctrl.
Whether it is possible to make, that pressing and holding Ctrl work in a RichView?
Posted: Wed Jul 28, 2010 11:33 am
by Sergey Tkachenko
I do not completely understand your question.
In TRichView and read-only TRichViewEdit, hypertext always work, even without pressing Ctrl.
In editable TRichViewEdit, hypertext works with Ctrl (if rvoCtrlJumps in EditorOptions).
Posted: Wed Jul 28, 2010 11:54 am
by monsoon
Sergey Tkachenko wrote:I do not completely understand your question.
In TRichView and read-only TRichViewEdit, hypertext always work, even without pressing Ctrl.
In editable TRichViewEdit, hypertext works with Ctrl (if rvoCtrlJumps in EditorOptions).
It is necessary for me, that in
TRichView hypertext works only with Ctrl and don't work without Ctrl
Posted: Wed Jul 28, 2010 11:59 am
by Sergey Tkachenko
Sorry, there are no ways to disable hypertext in TRichView.
You can only prevent executing any link if Ctrl is not pressed.
In OnJump event:
Code: Select all
procedure TForm1.RichView1Jump(Sender: TObject; id: Integer);
var KeyboardState: TKeyboardState;
begin
GetKeyboardState(KeyboardState);
if KeyboardState[VK_CONTROL] and $80 = 0 then
exit;
<process hyperlink click here>
end;
Posted: Wed Jul 28, 2010 12:04 pm
by monsoon
Sorry, I add in event OnJump function GetKeyState for Ctrl and now it's all work
Posted: Wed Jul 28, 2010 12:14 pm
by monsoon
Your answer almost same.
Thanks for help.