get the Selected Objects in a TWebbrowser?

  • 主题发起人 主题发起人 import
  • 开始时间 开始时间
I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
get the Selected Objects in a TWebbrowser? procedure TForm1.Button1Click(Sender: TObject);
begin
if Webbrowser1.OleObject.Document.Selection.type = 'Control' then
begin
if Webbrowser1.OleObject.Document.Selection.CreateRange.CommonParentElement.tagName =
'IMAGE' then
ShowMessage('An Image is selected');
end
else
begin
if Webbrowser1.OleObject.Document.Selection.createRange.Text = '' then
ShowMessage('Nothing is selected - ');
end;
end;
 

Similar threads

A
回复
0
查看
992
Andreas Hausladen
A
A
回复
0
查看
943
Andreas Hausladen
A
A
回复
0
查看
819
Andreas Hausladen
A
A
回复
0
查看
973
Andreas Hausladen
A
后退
顶部