View Issue Details

IDProjectCategoryView StatusLast Update
0002528JEDI VCL00 JVCL Componentspublic2006-06-27 07:17
ReporterSimesAssigned Toobones 
PrioritynormalSeverityminorReproducibilityunable to reproduce
Status resolvedResolutionfixed 
Product Version3.00 BETA 2 
Target VersionFixed in Version3.30 
Summary0002528: TJvEditor doesn't fully paint the window
DescriptionSee attached screenshot. This shows the TJvEditor component in an application. It can be seen that the editor has not full painted it's contents, as some parts of the parent window behind it are still visible. (The window behind is the main application. The JvEditor component is on a modal dialog.) None of the lines in the file being edited are blank. Curiously, it's always alternate lines that are not painted correctly. If the editor is scrolled so the offending lines are off screen, then scrolled back, the problem goes away until the next time the window is covered then uncovered.

None of the JvEditor events are attached to handlers.

This problem is only known to occur on two machines (P3-733, 256MB, Oxygen Labs video card) both running Windows NT, yet the problem does not occur on an identical spec machine running Windows 2K.

The user has many other applications on the same machine, and none of them ever exhibit this sort of problem.

I am unable to reproduce the problem at all, but then I'm also running Win2K or XP. My user tells me the problem happens every time on his NT box.
TagsNo tags attached.

Activities

2005-01-18 12:13

 

Editor.gif (27,881 bytes)
Editor.gif (27,881 bytes)

obones

2005-01-18 23:49

administrator   ~0006223

Which version of the JVCL are you using?
This remings me of a bug from WinNT with TMemo, TRichEdit and al.

Simes

2005-01-21 05:05

reporter   ~0006237

JVCL 3 RC1

AHUser

2005-01-22 07:22

developer   ~0006251

JvEditorCommon.pas::TJvCustomEditorBase.Scroll() should be the problem. It looks like that Windows NET has problems with the Win32API function ScrollDC().

Win32SDK says to ScrollDC: Minimum operating systems Windows 95, Windows NT 3.1.

Does it work if you insert this line before the ScrollDC call?
--------
RUpdate := ClientRect;
ScrollDC(...
--------

Simes

2005-01-24 10:41

reporter   ~0006268

Last edited: 2005-01-24 12:25

No, that line made no apparent difference.

But, if I understand the ScrollDC help correctly, RUpdate is an output parameter from ScrollDC. Should I be assigning R or RClip instead?

AHUser

2005-01-27 06:21

developer   ~0006297

RUpdate contains the correct value. But I just found out that sometimes it return (0,0,0,0). I have committed an update version that does a complete Invalidate if ScrollDC returns (0,0,0,0). Maybe this helps.

AHUser

2005-01-27 09:36

developer   ~0006298

This does not seem to be the problem. The (0,0,0,0) is returned when there is really nothing to repaint. I think a possible solution would be to disable optimized scrolling for NT<5.0 as the issue only happens on NT.

Simes

2005-01-31 06:59

reporter   ~0006325

My user tried the latest version, but it didn't seem any different. The problem still occurred.

AHUser

2005-01-31 10:55

developer   ~0006326

What happens if you remove the whole {$IFDEF ... ENDIF} Block? If this does not work either, then the bug must be somewhere else.

Simes

2005-02-01 11:28

reporter   ~0006328

Comment from my user: "...display is actually much worse on NT. Still see the same improper redraw. Before, we could use the scrollbar to scroll up and down a couple of times to get a good display. Now, scrolling up and down doesn't help. Pretty much unusable on our NT systems. I checked on updated video drivers - none available. Still looks normal on Win2K"

Can I just check I commented out the correct code... in TJvCustomEditorBase.Scroll, the vertical scroll block, I commented out the following code:

      {$IFDEF VCL}
      if Abs((OldFTopRow - ScrollPos) * FCellRect.Height) < FEditorClient.Height then
      begin
        R := FEditorClient.ClientRect;
        R.Bottom := R.Top + CellRect.Height * FVisibleRowCount;
        R.Left := 0; // update gutter
        RClip := R;
        Inc(RClip.Bottom, CellRect.Height);
        ScrollDC(
          FEditorClient.Canvas.Handle, // handle of device context
          0, // horizontal scroll units
          (OldFTopRow - ScrollPos) * CellRect.Height, // vertical scroll units
          R, // address of structure for scrolling rectangle
          RClip, // address of structure for clipping rectangle
          0, // handle of scrolling region
          @RUpdate // address of structure for update rectangle
          );
        // (ahuser) WinNT seams to have problems with ScrollDC in vertical direction. (Mantis 0002528)
        if (Win32Platform = VER_PLATFORM_WIN32_NT) and (Win32MajorVersion < 5) then
          Dec(RUpdate.Top, CellRect.Height);
        Inc(RUpdate.Bottom, CellRect.Height);
        InvalidateRect(Handle, @RUpdate, False);
      end
      else
      {$ENDIF VCL}

AHUser

2005-02-01 11:48

developer   ~0006329

Yes, that is the code that seems to not work under NT.

obones

2005-08-10 08:44

administrator   ~0007787

Is this still here?

Simes

2005-08-11 02:01

reporter   ~0007792

Yes, this has not been resolved

obones

2006-04-03 00:55

administrator   ~0008816

Any news, anyone?

obones

2006-06-08 02:31

administrator   ~0009430

Hello?

obones

2006-06-27 07:17

administrator   ~0009687

No answers, I'm assuming this is fixed in the latest SVN version

http://homepages.borland.com/jedi/wiki/index.php?title=Repository

Issue History

Date Modified Username Field Change
2005-01-18 12:13 Simes New Issue
2005-01-18 12:13 Simes File Added: Editor.gif
2005-01-18 23:49 obones Note Added: 0006223
2005-01-18 23:49 obones Status new => feedback
2005-01-21 05:05 Simes Note Added: 0006237
2005-01-22 07:22 AHUser Note Added: 0006251
2005-01-24 10:41 Simes Note Added: 0006268
2005-01-24 12:25 Simes Note Edited: 0006268
2005-01-27 06:21 AHUser Note Added: 0006297
2005-01-27 09:36 AHUser Note Added: 0006298
2005-01-31 06:59 Simes Note Added: 0006325
2005-01-31 10:55 AHUser Note Added: 0006326
2005-02-01 11:28 Simes Note Added: 0006328
2005-02-01 11:48 AHUser Note Added: 0006329
2005-08-10 08:44 obones Note Added: 0007787
2005-08-11 02:01 Simes Note Added: 0007792
2006-04-03 00:55 obones Note Added: 0008816
2006-06-08 02:31 obones Note Added: 0009430
2006-06-27 07:17 obones Status feedback => resolved
2006-06-27 07:17 obones Fixed in Version => Daily / SVN
2006-06-27 07:17 obones Resolution open => fixed
2006-06-27 07:17 obones Assigned To => obones
2006-06-27 07:17 obones Note Added: 0009687