- This topic has 22 replies, 2 voices, and was last updated 6 years, 9 months ago by HeDiBo.
-
AuthorPosts
-
April 8, 2017 at 10:46 am #37429HeDiBoParticipant
I use a dynamically generated HTML page, that uses text and background color according to the used skin.
If the TsWebBrowser component finds a vertical scroll bar is not needed, it does not hide it. It shows it unskinned. Which in my case is extremely ugly:
[attachment=8229:TsWebBrowser.jpg]
April 10, 2017 at 10:11 am #56455SupportKeymasterIs it possible to make a test-app for this issue?
April 10, 2017 at 4:19 pm #56466HeDiBoParticipant'Support' wrote:Is it possible to make a test-app for this issue?
Here it is:
[attachment=8238:acWebBrws.zip]
April 15, 2017 at 11:00 am #56501HeDiBoParticipantProblem still exists in AC 12.05
April 18, 2017 at 1:03 pm #56513SupportKeymasterI'm sorry, I can't compile the demo. The 'Common' doesn't exists.
April 18, 2017 at 1:32 pm #56516HeDiBoParticipant'Support' wrote:I'm sorry, I can't compile the demo. The 'Common' doesn't exists.
You probably already found the correct version:
http://www.alphaskins.com/forum/index.php?showtopic=9513&st=0#entry50100
April 22, 2017 at 8:23 am #56527SupportKeymasterYou can remove 1 topic, I think…
April 22, 2017 at 10:18 am #56530HeDiBoParticipant'Support' wrote:You can remove 1 topic, I think…
The topic you're referring to is an offer to include the code into one of the upcoming releases of AC.
The same code is used here to show a bug in the TsWebBrowser component.
So both topics serve their own purpose.
April 22, 2017 at 11:18 am #56532HeDiBoParticipant'Support' wrote:Thank you
I can suggest you to hide this control in the document body style:
Code:I can't remove this scroll by delphi code, unfortunately, because it's drawn in the document and I have no idea how to do it currently.
In principle, this is a good solution, but the TsWebBrowser component will show a horizontal scroll bar if the HTML text does not fit the window.
It should not do that, in fact it should almost never do that, because the text should be wrapped.
It's almost impossible to get rid of the horizontal scroll bar.
To illustrate, this is the same demo project, but with the suggested addition of disabling the vertical scroll bar:
[attachment=8260:acWebBrowseScroll.zip]
Try to get rid of the horizontal scroll bar.
April 22, 2017 at 11:30 am #56533HeDiBoParticipant'HeDiBo' wrote:In principle, this is a good solution, but the TsWebBrowser component will show a horizontal scroll bar if the HTML text does not fit the window.
It should not do that, in fact it should almost never do that, because the text should be wrapped.
It's almost impossible to get rid of the horizontal scroll bar.
Setting SkinData.HorzScrollData.ScrollWidth to 0 will do the trick. But that would disable the horizontal scroll bar for all content.
January 9, 2018 at 2:37 pm #57454HeDiBoParticipant[Content was edited mistakenly by Serge]
January 10, 2018 at 4:14 pm #57455SupportKeymasterThank you for the demo.
I know how to remove a scrollbar, but I don't know When I must do that.
That's the problem, I can't catch event when visivility of scrollbar is changed.
January 10, 2018 at 5:14 pm #57459HeDiBoParticipant'Support' wrote:Thank you for the demo.
I know how to remove a scrollbar, but I don't know When I must do that.
That's the problem, I can't catch event when visivility of scrollbar is changed.
What's the best way to remove the scrollbar? Maybe I can do it myself?
January 10, 2018 at 5:29 pm #57460SupportKeymasterTry this line:
Code:WebBrowser.OleObject.Document.Body.Style.OverflowY := 'hidden';January 10, 2018 at 7:06 pm #57469HeDiBoParticipantJust an observation:
Every time a webpage does not fit the window, a nicely themed vertical scrollbar appears. Apparently AC is able to find out when to draw this scrollbar. Then if the page does fit the window, the themed scrollbar disappears. And it comes back again when the page does not fit the window.
Now you're saying that you do not know when to remove the standard scrollbar. But in a way AC does this already. Because when you remove the styled scrollbar, that's also the time to remove the standard vertical scrollbar.
Just a thought.
January 25, 2018 at 7:21 am #57485SupportKeymasterHello!
I will try to do it, but my solution for hiding of std scrolls is not universal, seems.
Have you checked this code more?
January 25, 2018 at 2:36 pm #57495HeDiBoParticipant'Support' wrote:Hello!
I will try to do it, but my solution for hiding of std scrolls is not universal, seems.
Have you checked this code more?
I've done better than that, I've found a good solution to this.
Have a look at this article. It comes complete with a demo program. Its principle is to host the webbrowser in a specially crafted IDocHostUIHandler interface. By doing so, apparently you can show and hide the vertical scroll bar at will.
January 26, 2018 at 4:08 pm #57498SupportKeymasterThank you for a link
Do you have pages examples which I can test? Where scrollbar is shown as not skinned.
January 30, 2018 at 10:21 am #57519HeDiBoParticipant'Support' wrote:Thank you for a link
Do you have pages examples which I can test? Where scrollbar is shown as not skinned.
This one is fairly short: [attachment=8605:CorrPersonsED.html]
This one is a little bigger: [attachment=8606:Participants.Pairs.html]
February 2, 2018 at 8:00 am #57523SupportKeymasterThank you for files
I have tried to implement a hiding of standard scrolls, try the attached file, plz.
-
AuthorPosts
- You must be logged in to reply to this topic.