Webbrowser and WebGMapsLookupEdit

Viewing 20 posts - 1 through 20 (of 38 total)
  • Author
    Posts
  • #36317
    minou
    Participant

    hello

    I'm trying to skin a scrollbar in( Webbrowser and WebGMapsLookupEdit) but cannot get it to work

    • version 9.10
    • Delphi XE3

    Code:
    procedure WBLoadHTML(WebBrowser: TWebBrowser; HTMLCode: string) ;
    var
    sl: TStringList;
    ms: TMemoryStream;
    begin

    WebBrowser.Navigate('about:blank') ;
    while WebBrowser.ReadyState < READYSTATE_INTERACTIVE do
    Application.ProcessMessages;

    if Assigned(WebBrowser.Document) then
    begin
    sl := TStringList.Create;
    try
    ms := TMemoryStream.Create;
    try
    sl.Text := HTMLCode;
    sl.SaveToStream(ms) ;
    ms.Seek(0, 0) ;
    (WebBrowser.Document as IPersistStreamInit).Load(TStreamAdapter.Create(ms)) ;
    finally
    ms.Free;
    end;
    finally
    sl.Free;
    end;
    end;
    end;

    Code:
    WBLoadHTML(WebBrowser1,sMemo1.Text);

    This proposed solution !!

    Code:
    uses mshtml;

    procedure TForm11.WebBrowser1DocumentComplete(ASender: TObject;
    const pDisp: IDispatch; const URL: OleVariant);
    var
    Doc: IHTMLDocument2;
    body: OleVariant;
    begin
    Doc := IHTMLDocument2(WebBrowser1.Document);
    body := Doc.Body;

    {hide scrollbars}
    body.Style.BorderStyle := 'none';
    body.Scroll := 'no';

    end;

    an you please check?

    Thanks!

    #52642
    Support
    Keymaster

    Hello!

    I will check it soon.

    #52795
    HeDiBo
    Participant
    'Support' wrote:

    Hello!

    I will check it soon.

    I would like to skin the scroll bars of a TWebBrowser control also. Is this fixed in the latest release? Because this is already a very old issue.

    #52803
    Support
    Keymaster

    Hello!

    You saw this demo already?

    http://www.alphaskins.com/sfiles/demos/webbrowser.zip

    #52836
    HeDiBo
    Participant
    'Support' wrote:

    Hello!

    You saw this demo already?

    http://www.alphaskin…/webbrowser.zip

    The demo depends on setting

    {$DEFINE ADDWEBBROWSER} // Support of the TWebBrowser (full AC sources needed)

    in sDefs.inc

    But that will bring in webbrowser stuff for all projects, not only for those that need it.

    So, what we really want is a TsWebBrowser component. Then only projects needing web browsing will bring in the libraries needed for that.

    Thanks!

    Dick

    #52839
    Support
    Keymaster

    Hello Dick! Maybe you are right, I will think about that.

    #52845
    mol
    Participant

    Serge,

    Just remember that it is possible to change all scrollbar elements with CSS through IE-proprietary tags. Might interfere with the painting of your own scrollbars.

    -Uwe

    #52846
    HeDiBo
    Participant
    'Support' wrote:

    Hello Dick! Maybe you are right, I will think about that.

    Thanks!

    #52847
    HeDiBo
    Participant
    'mol' wrote:

    Just remember that it is possible to change all scrollbar elements with CSS through IE-proprietary tags. Might interfere with the painting of your own scrollbars.

    Would that work in Firefox and/or Chrome too?

    If the tags are proprietary for IE, I wouldn't bother. A good web design would not use proprietary IE stuff.

    #52848
    mol
    Participant

    Hi Dick,

    AFAIK, Firefox and Chrome do not allow user-defined painting of scrollbars, but there are other ways such as WebKit CSS to achieve this. IE is important though because the TWebBrowser component is based on it.

    -Uwe

    #52855
    HeDiBo
    Participant
    'mol' wrote:

    AFAIK, Firefox and Chrome do not allow user-defined painting of scrollbars, but there are other ways such as WebKit CSS to achieve this. IE is important though because the TWebBrowser component is based on it.

    In that case, there's yet another way of painting the scrollbars properly: let the URLs be hosted by an AC HTML page with the poper skinning through CSS fiddling

    Is that an idea Serge?

    #52898
    Support
    Keymaster

    Hello!

    Standard scrollbars are replaced by TsScrollbar control when TWebBrowser is skinned

    Scrollbars which are drawn in document are hidden.

    #52906
    HeDiBo
    Participant
    'Support' wrote:

    Hello!

    Standard scrollbars are replaced by TsScrollbar control when TWebBrowser is skinned

    Scrollbars which are drawn in document are hidden.

    I know. But I suggested not to hide the scrollbars in the document, but replace them with properly skinned ones.

    #53110
    HeDiBo
    Participant
    'HeDiBo' wrote:

    So, what we really want is a TsWebBrowser component. Then only projects needing web browsing will bring in the libraries needed for that.

    No progress on this front in AC 9.20 :a1:

    #53130
    Support
    Keymaster

    TsWebBrowser component will be added in the AC v10.01

    #53162
    HeDiBo
    Participant
    'Support' wrote:

    TsWebBrowser component will be added in the AC v10.01

    Very nice :a3:

    #53241
    HeDiBo
    Participant
    'Support' wrote:

    TsWebBrowser component will be added in the AC v10.01

    It works great :a3:

    I think the places where the compiler switch ADDWEBBROWSER is used, can be eliminated.

    #53251
    Support
    Keymaster

    This switch was retained for backward compatibility, some projects uses it.

    #53566
    minou
    Participant

    sWebBrowser1DocumentComplete not work correctly

    #53573
    HeDiBo
    Participant
    'minou' wrote:

    sWebBrowser1DocumentComplete not work correctly

    If you want some action on this bug, you should be more informative about what goes wrong.

    Please specify what the problem is.

Viewing 20 posts - 1 through 20 (of 38 total)
  • You must be logged in to reply to this topic.