Jump to content

Search the Community

Showing results for tags 'tcppwebbrowser'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 1 result

  1. In my application I generate a SVG graphic in a TCppWebBrowser by providing GraphViz dot language code that is converted to SVG by a JavaScript version of GraphViz viz.js. File _test.html shows the original HTML page (dot code and JavaScript code) that produces the SVG output shown in file test.html. In the form with the TCppWebBrowser component I added some buttons to zoom in, out and reset to 100%: //--------------------------------------------------------------------------- void __fastcall TFormViewer::btZoomInClick(TObject *Sender) { ZoomFactor *= 1.1; OleVariant ZoomFac = int(ZoomFactor); CppWebBrowser1->ExecWB(63, OLECMDEXECOPT_DONTPROMPTUSER, ZoomFac, 0); } //--------------------------------------------------------------------------- void __fastcall TFormViewer::btZoomOutClick(TObject *Sender) { ZoomFactor *= 0.9; OleVariant ZoomFac = int(ZoomFactor); CppWebBrowser1->ExecWB(63, OLECMDEXECOPT_DONTPROMPTUSER, ZoomFac, 0); } //--------------------------------------------------------------------------- // void __fastcall TFormViewer::btResizeClick(TObject *Sender) { ZoomFactor = 100; OleVariant ZoomFac = int(ZoomFactor); CppWebBrowser1->ExecWB(63, OLECMDEXECOPT_DONTPROMPTUSER, ZoomFac, 0); } This works fine but for huge networks with hundreds of elements I would like to zoom to a specific element by name (in test.html e.g. to "HE M15". My idea is to change the viewBox attribute of the svg object. So, I need to find the element with the specific name (e.g. "HE M15"), read the x, y coordinates of the text and change the viewBox accordingly. Would this be possible by IHTMLWindow2::execScript (JavaScript code) or other tools to access the DOM... or would it be easier to save the html page, load it in a StringList, search the element and coordinates there and change the viewBox attribute, save the file and load it into the TCppWebBrowser component again? __test.html test.html
×