View Issue Details

IDProjectCategoryView StatusLast Update
0016638LazarusLCLpublic2010-10-31 23:02
ReporterSven BarthAssigned ToFelipe Monteiro de Carvalho 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.29 (SVN)Product Build 
Target VersionFixed in Version0.9.29 (SVN) 
Summary0016638: WinCE: Client area of scrollbox is scrolled in wrong direction
DescriptionWhen putting controls outside of the visible client area of a scrollbox and scrolling this box during runtime the controls are moved in the wrong direction (which is possible indefinitly when AutoScroll=True).
Additional InformationAttached example demonstrates this: some buttons are put beyond client area range and if scrolled they move into the wrong direction.

Comparing the ScrollBy methods in the WinCEWSForms and Win32WSForms provides the solution: the Delta values are negated in TWin32WSScrollingWinControl.ScrollBy while in the WinCE equivalent they are not. Attached patch solves this.
TagsNo tags attached.
Fixed in Revision25897
LazTarget-
WidgetsetWinCE
Attached Files
  • scrollboxdirection.zip (2,235 bytes)
  • scrollbox-patch.patch (631 bytes)
    Index: wincewsforms.pp
    ===================================================================
    --- wincewsforms.pp	(revision 25892)
    +++ wincewsforms.pp	(working copy)
    @@ -168,9 +168,9 @@
      // roozbeh:which flags really are required?!
      if lVisible then
       {$ifdef win32}
    -  ScrollWindowPtr(AWinControl.Handle, DeltaX, DeltaY, nil, nil);
    +  ScrollWindowPtr(AWinControl.Handle, -DeltaX, -DeltaY, nil, nil);
       {$else}
    -  ScrollWindowPtr(AWinControl.Handle, DeltaX, DeltaY, nil, nil,
    +  ScrollWindowPtr(AWinControl.Handle, -DeltaX, -DeltaY, nil, nil,
         rgn, nil, SW_INVALIDATE or SW_ERASE or SW_SCROLLCHILDREN);
       {$endif}
     end;
    
    scrollbox-patch.patch (631 bytes)

Relationships

duplicate of 0013300 closedFelipe Monteiro de Carvalho TScrollBox and WinCE 
related to 0011567 closedFelipe Monteiro de Carvalho ScrollBox doesn't work properly 
related to 0016379 closedFelipe Monteiro de Carvalho WinCE: TImage is not drawn at it's correct position in TScrollBox 

Activities

2010-06-04 15:55

 

scrollboxdirection.zip (2,235 bytes)

2010-06-04 15:56

 

scrollbox-patch.patch (631 bytes)
Index: wincewsforms.pp
===================================================================
--- wincewsforms.pp	(revision 25892)
+++ wincewsforms.pp	(working copy)
@@ -168,9 +168,9 @@
  // roozbeh:which flags really are required?!
  if lVisible then
   {$ifdef win32}
-  ScrollWindowPtr(AWinControl.Handle, DeltaX, DeltaY, nil, nil);
+  ScrollWindowPtr(AWinControl.Handle, -DeltaX, -DeltaY, nil, nil);
   {$else}
-  ScrollWindowPtr(AWinControl.Handle, DeltaX, DeltaY, nil, nil,
+  ScrollWindowPtr(AWinControl.Handle, -DeltaX, -DeltaY, nil, nil,
     rgn, nil, SW_INVALIDATE or SW_ERASE or SW_SCROLLCHILDREN);
   {$endif}
 end;
scrollbox-patch.patch (631 bytes)

Felipe Monteiro de Carvalho

2010-06-04 19:12

developer   ~0038314

Thanks, applied

Sven Barth

2010-10-31 23:02

manager   ~0042515

You're welcome.

Regards,
Sven

Issue History

Date Modified Username Field Change
2010-06-04 15:55 Sven Barth New Issue
2010-06-04 15:55 Sven Barth File Added: scrollboxdirection.zip
2010-06-04 15:55 Sven Barth Widgetset => WinCE
2010-06-04 15:56 Sven Barth File Added: scrollbox-patch.patch
2010-06-04 18:58 Felipe Monteiro de Carvalho Relationship added duplicate of 0013300
2010-06-04 18:58 Felipe Monteiro de Carvalho Status new => assigned
2010-06-04 18:58 Felipe Monteiro de Carvalho Assigned To => Felipe Monteiro de Carvalho
2010-06-04 19:12 Felipe Monteiro de Carvalho Fixed in Revision => 25897
2010-06-04 19:12 Felipe Monteiro de Carvalho LazTarget => -
2010-06-04 19:12 Felipe Monteiro de Carvalho Status assigned => resolved
2010-06-04 19:12 Felipe Monteiro de Carvalho Fixed in Version => 0.9.29 (SVN)
2010-06-04 19:12 Felipe Monteiro de Carvalho Resolution open => fixed
2010-06-04 19:12 Felipe Monteiro de Carvalho Note Added: 0038314
2010-06-04 19:15 Felipe Monteiro de Carvalho Relationship added related to 0011567
2010-06-04 19:16 Felipe Monteiro de Carvalho Relationship added related to 0016379
2010-10-31 23:02 Sven Barth Status resolved => closed
2010-10-31 23:02 Sven Barth Note Added: 0042515