AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Delphi TWebBrowser Scrollbar Problem - Zugriffsverletzung beim entfernen der Scrollbar
Thema durchsuchen
Ansicht
Themen-Optionen

TWebBrowser Scrollbar Problem - Zugriffsverletzung beim entfernen der Scrollbar

Ein Thema von Premaider · begonnen am 11. Apr 2012 · letzter Beitrag vom 11. Apr 2012
 
Benutzerbild von Bummi
Bummi

Registriert seit: 15. Jun 2010
Ort: Augsburg Bayern Süddeutschland
3.470 Beiträge
 
Delphi XE3 Enterprise
 
#4

AW: TWebBrowser Scrollbar Problem - Zugriffsverletzung beim entfernen der Scrollbar

  Alt 11. Apr 2012, 17:59
Delphi-Quellcode:
procedure TWebbrowserKeeperF.WebBrowserSet3DBorderStyle(bValue: Boolean);
var
  StrBorderStyle: AnsiString;
  tmpElement,
  tmpDocument,
  Element,
  Document : OleVariant;
begin
  if Assigned(WB) then begin
  try
    try
      Document := WB.OleObject.Document;
      if Assigned(TVarData(Document).VPointer) then begin // (varType(Document) = varDispatch) and not VarIsEmpty(Document) and not VarIsNull(Document) then begin
        Element := Document.Body;
        if Assigned(TVarData(Element).VPointer) then // and (varType(Element) = varDispatch) and not VarIsEmpty(Element) and not VarIsNull(Element)
        begin
          case bValue of
            False: StrBorderStyle := 'none';
            True: StrBorderStyle := '';
          end;
          Element.Style.BorderStyle := StrBorderStyle;
          Element.Style.overflowX := 'auto'; // horizontale Scrollbar nur bei Bedarf einblenden
          Element.Style.overflowY := 'auto'; // vertikale Scrollbar nur bei Bedarf einblenden
        end; // (mögliche Werte:
      end; // 'visible' Default. No scroll bar. Display is clipped to visible area.
    except // 'scroll' Scroll bar always visible - whether required or not.
    end; // 'hidden' No scroll bar. Content outside of visible area is hidden.
  finally // 'auto' Content is clipped and scroll bar is displayed if required.)
    Element := tmpElement;
    Document := tmpDocument;
  end;
  end;
end;
Thomas Wassermann H₂♂
Das Problem steckt meistens zwischen den Ohren
DRY DRY KISS
H₂ (wenn bei meinen Snipplets nichts anderes angegeben ist Lizenz: WTFPL)
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:59 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz