- This topic has 37 replies, 5 voices, and was last updated 9 years ago by arabelaalborn.
-
AuthorPosts
-
October 14, 2014 at 7:40 am #36317minouParticipant
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;
beginWebBrowser.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!
October 22, 2014 at 2:55 pm #52642SupportKeymasterHello!
I will check it soon.
November 21, 2014 at 7:35 pm #52795HeDiBoParticipant'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.
November 25, 2014 at 1:37 pm #52803SupportKeymasterDecember 1, 2014 at 4:44 pm #52836HeDiBoParticipant'Support' wrote: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
December 3, 2014 at 1:20 pm #52839SupportKeymasterHello Dick! Maybe you are right, I will think about that.
December 3, 2014 at 5:23 pm #52845molParticipantSerge,
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
December 3, 2014 at 7:06 pm #52846HeDiBoParticipant'Support' wrote:Hello Dick! Maybe you are right, I will think about that.
Thanks!
December 3, 2014 at 7:17 pm #52847HeDiBoParticipant'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.
December 3, 2014 at 9:19 pm #52848molParticipantHi 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
December 4, 2014 at 5:41 pm #52855HeDiBoParticipant'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?
December 13, 2014 at 7:41 am #52898SupportKeymasterHello!
Standard scrollbars are replaced by TsScrollbar control when TWebBrowser is skinned
Scrollbars which are drawn in document are hidden.
December 13, 2014 at 4:30 pm #52906HeDiBoParticipant'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.
February 19, 2015 at 4:44 pm #53110HeDiBoParticipant'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:
February 28, 2015 at 4:38 pm #53130SupportKeymasterTsWebBrowser component will be added in the AC v10.01
March 1, 2015 at 2:15 pm #53162HeDiBoParticipant'Support' wrote:TsWebBrowser component will be added in the AC v10.01
Very nice :a3:
March 27, 2015 at 4:40 pm #53241HeDiBoParticipant'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.
March 30, 2015 at 8:43 am #53251SupportKeymasterThis switch was retained for backward compatibility, some projects uses it.
July 1, 2015 at 12:05 pm #53566minouParticipantsWebBrowser1DocumentComplete not work correctly
July 2, 2015 at 6:50 pm #53573HeDiBoParticipant'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.
-
AuthorPosts
- You must be logged in to reply to this topic.