Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TWebExplorer - queryCommandEnabled

Posted on 1998-08-05
2
Medium Priority
?
234 Views
Last Modified: 2010-05-19
I am using
WebBrowser.OleObject.Document.queryCommandEnabled('Copy') to
enable/disable the copy button on my web browser.  The problem is that this does not work with pages with frames.

It was explained to me that because the
WebBrowser.OleObject.Document is the HTML page that contains the FRAMES,
each frame contains an HTML page. So I need  to query those pages.  Possibly with something similar to

WebBrowser.OleObject.Document.Frames(i).Document.queryCommandEnabled('Copy')

where i is the frame that has focus.

The above line of code is not the exact syntax so my question is what is the
right syntax to point to the frame document for the frame that has the
focus.

Thank you.
0
Comment
Question by:alexandram
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
freter earned 960 total points
ID: 1359946
Ok. Here is the code:
>>>>>>>>>>>>>>>
procedure TMainForm.ToolButton2Click(Sender: TObject);
var i: integer;
begin
  for i := 0 to (Viewer.OleObject.Document.frames.Length - 1) do
    if Viewer.OleObject.Document.frames.item(i).document.queryCommandEnabled('Copy') then showmessage('yes');
end;
<<<<<<<<<<<<<<<<<<<

BTW, have you tried using the DHTMLEd OCX yet? I am constantly receiving Access violations when placing it on a form. Do you experience the same?

Regards,
Freter

0
 

Author Comment

by:alexandram
ID: 1359947
Thank you, it is exacly what I was looking for.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question