View Issue Details

IDProjectCategoryView StatusLast Update
0001593JEDI VCL00 JVCL Componentspublic2004-04-08 09:55
ReporteritustecAssigned Touser72 
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001593: TJvImagesViewer repaints diferent when scroll with mouse or scroll with code
DescriptionThe component TJvImagesViewer does not repaint when scroll scroll with code. For example:
JvImagesViewer1.VertScrollBar.Position := JvImagesViewer1.VertScrollBar.Position + 100;

The images don't repaint and then don't view correctly.

But, when our scroll the component with the mouse then it show perfectly.


Thanks!!

TagsNo tags attached.

Activities

user72

2004-04-06 23:46

  ~0003678

Try calling JvImagesViewer1.Invalidate after scrolling manually.

To make a particular item visible, use TJvImagesViewer.ScrollIntoView(Index) instead.

itustec

2004-04-07 10:38

reporter   ~0003684

TJvImagesViewer does not scroll the content (the images) when I scroll manually, for example:
  iv.VertScrollBar.Position := iv.VertScrollBar.Position + 140;

But, is you scroll with the mouse or with the mouse wheel, the component work perfectly, only failures when intended scroll manually.

I had proved with the method "Invalidate", and the component doesn't display any change when i scroll it manually.
I had proved with methods: Update, Refresh, Reload and I don't obtain the adecuate reply.

The component conly "refresh" the view when use the real mouse, it does not work with scroll manually.

Can I manually scroll the content? How can I?


Thanks very much!!!

itustec

2004-04-07 11:20

reporter   ~0003685

>To make a particular item visible, use TJvImagesViewer.ScrollIntoView(Index) instead.

The method ScrollIntoView requires a TControl parameter not an index (integer value).

Delphi Help:
Scrolls a control into the visible area of the scrolling windowed control.
Delphi syntax:
  procedure ScrollInView(AControl: TControl)

Description
Use ScrollInView to ensure that a specified control is in the visible area of the scrolling windowed control. AControl specifies the TControl object to scroll into view.

user72

2004-04-07 12:22

  ~0003687

Sorry, I just checked and the ScrollIntoView(Index) method is protected in TJvCustomItemViewer. I've made it public (in CVS)

For the type of scrollling you requested, I've added a redeclared, public ScrollBy method that looks like this:

procedure TJvCustomItemViewer.ScrollBy(DeltaX, DeltaY: integer);
begin
  if DeltaX <> 0 then
    HorzScrollBar.Position := HorzScrollBar.Position + DeltaX;
  if DeltaY <> 0 then
    VertScrollBar.Position := VertScrollBar.Position + DeltaY;
  UpdateAll;
end;


BTW, the method that takes a TControl as parameter is named ScrollInView, not ScrolIntoView

itustec

2004-04-08 09:18

reporter   ~0003725

Thanks!!

With this method (ScrollBy(DeltaX, DeltaY: integer);) the scroll runs perfectly.

user72

2004-04-08 09:55

  ~0003733

Already fixed in CVS, so should work now.

Issue History

Date Modified Username Field Change
2004-04-06 19:28 itustec New Issue
2004-04-06 23:46 user72 Note Added: 0003678
2004-04-06 23:55 user72 Status new => assigned
2004-04-06 23:55 user72 Assigned To => user72
2004-04-07 10:38 itustec Note Added: 0003684
2004-04-07 11:20 itustec Note Added: 0003685
2004-04-07 12:22 user72 Note Added: 0003687
2004-04-08 09:18 itustec Note Added: 0003725
2004-04-08 09:55 user72 Status assigned => resolved
2004-04-08 09:55 user72 Resolution open => fixed
2004-04-08 09:55 user72 Note Added: 0003733