🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #995

Is there a way to determine if an HTML element is currently visible in TCPPWebBrowser control.

#995
From: James O'Brien
Date: Sun, 16 Oct 2005 04:58
22 lines
2162 bytes
Hello,

Actually this isn't so much TCPPWebBrowser question, but a MSHTML question.
I need to be able to determine whether an HTML element is currently visible
within the TCPPWebBrowser window.   I'm writing code which will use a
TCPPWebBrowser control to simulate a listbox.  As I press the UP/DOWN arrows
on the keyboard,  a colored retangle will move up or down the screen to the
next object of interest in the HTML document.

All this is working fine, but I'm having to force a "scrollIntoView()" as an
object gets hilited.  Visually this is confusing, because an element that is
clearly on screen suddenly moves to the top(or bottom) of the window.  I'd
prefer to only call scrollIntoview() if an object isn't currently visible.

I'm able to calculate the document relative postions of each element I want
to hilite.  The only values I'm missing are the demensions of the Browser
window(less any defined margins) and the area within the document that the
browser window represents.  Are these values available?  I'm at a loss on
how to get them.

Thanks,
James O'Brien
Technical Details
Message-ID: <4351dd56$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder.xsnews.nl!216.196.110.148.MISMATCH!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeeder.wxs.nl!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,4d59fb111ec2a1ba,start
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "James O'Brien" <obrien@niscnet.com>
From: "James O'Brien" <obrien@niscnet.com>
Newsgroups: borland.public.cppbuilder.internet.web
Subject: Is there a way to determine if an HTML element is currently visible in TCPPWebBrowser control.
Date: Sun, 16 Oct 2005 00:58:29 -0400
Lines: 24
Organization: NISC
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
NNTP-Posting-Host: 69.171.99.154
Message-ID: <4351dd56$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1129438550 69.171.99.154 (15 Oct 2005 21:55:50 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder.xsnews.nl!216.196.110.148.MISMATCH!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeeder.wxs.nl!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail