acbarbosa1964 / thtmlviewer

Automatically exported from code.google.com/p/thtmlviewer
Other
0 stars 2 forks source link

HTMLView will not be redrawn if placed on TabSheet in D2010 #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Place 2 TabSheets on a PageControl
2. Place on every TabSheet 1 THTMLView
3. Place the XPThemeManager on the Form
4. Load in every THTMLView a Document
5. Start
6. The Doc drawed correct
7. Tab between the pages and the doc will be empty

What version of the product are you using? On what operating system?

Delphi 2010
THTMLView 10.0 from SVN
Windows 7

Original issue reported on code.google.com by Sven.Har...@gmail.com on 5 Aug 2010 at 12:07

Attachments:

GoogleCodeExporter commented 9 years ago
On Windows XP it works properly.

Are there additional OnPaint-Events in Windows 7.

Original comment by Sven.Har...@gmail.com on 21 Sep 2010 at 9:27

GoogleCodeExporter commented 9 years ago
if the content of htmlview is not visible:

- call htmlviewer.Repaint;
- switch to another tabsheet and back - the content will be visible again (not 
directly after calling the method)

Original comment by Sven.Har...@gmail.com on 22 Sep 2010 at 6:37

GoogleCodeExporter commented 9 years ago
i revisit the htmlviewcode

if content is "normal"-html, it works fine. only <form>-content is unvisible.

ThtmlViewer.Repaint makes formcontrols unvisible. Who makes them visible again?

procedure ThtmlViewer.Repaint;
var
  I: integer;
begin
  for I := 0 to FormControlList.count - 1 do
    with TFormControlObj(FormControlList.Items[I]) do
      if Assigned(TheControl) then
        TheControl.Hide;
  BorderPanel.BorderStyle := bsNone;
  inherited Repaint;
end;

Original comment by Sven.Har...@gmail.com on 22 Sep 2010 at 6:52

GoogleCodeExporter commented 9 years ago
First question of all: why does Repaint hide the form controls?

Original comment by OrphanCat on 22 Sep 2010 at 12:03

GoogleCodeExporter commented 9 years ago
Extending your test code of issue 23 I cannot reproduce this issue with D2007, 
XP. 
Why do you use the XpThemeManager with Delphi 2010? Is it required to reproduce 
this issue?

BTW: The html form code seems to be designed for a single HtmlViewer per 
dialog. When you select a radio button on one page, changing to the other page 
processes the selection code again for the other HtmlViewer and selects the 
first button.

Original comment by OrphanCat on 22 Sep 2010 at 2:03

Attachments:

GoogleCodeExporter commented 9 years ago
Windows XP is not involved. 

XpThemeManager is not needed.

You need 1 HTMLView on 1 TabSheet to reproduce this problem on Windows 7. If 
you switch between the HTMLView-TabSheet and other TabSHeets, then the 
html-form will be hided. But on Windows 7 not to visible back again. Sorry for 
my english.

Sven

Original comment by Sven.Har...@gmail.com on 22 Sep 2010 at 3:36

GoogleCodeExporter commented 9 years ago
OK. I can reproduce it with D2006 on Windows 7:
I loaded your posted html files into the extended issue 23 test of comment 5. 
The original test pages are working correct though.

Original comment by OrphanCat on 22 Sep 2010 at 10:47

GoogleCodeExporter commented 9 years ago
The error appears when a TEdit or TMemo control of the form is visible. It 
seems that the controls disturb the message processing. No windows messages are 
processed while the error is visible. On closing the application, all the 
missing messages seem to be received.

You might use TFrameViewer instead of a THtmlViewer. TFrameViewer works correct 
with the same html files. However TFrameViewer cannot load from string, but I'm 
working on that.

Original comment by OrphanCat on 23 Sep 2010 at 12:53

GoogleCodeExporter commented 9 years ago
TFrameViewer can load from string since r70. 
Even TFrameBrowser can load from string and file without additional events 
since r72.

Original comment by OrphanCat on 26 Sep 2010 at 11:40