View Issue Details

IDProjectCategoryView StatusLast Update
0036412LazarusWidgetsetpublic2019-12-09 20:39
ReporterBrunoKAssigned ToJuha Manninen 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platform32 / 64 bitOSwindowsOS Version10
Product Version2.0.7 (SVN)Product Build 
Target VersionFixed in Version 
Summary0036412: TWin32WSCustomTabControl.GetTabRect doesn't return correct rectangle
DescriptionGetTabRect transforms the rectangle returned by call to windows TCM_GETITEMRECT to a useless rectangle.

Additional InformationProbably also wrong in lcl\interfaces\wince\wincepagecontrol.inc
TagsNo tags attached.
Fixed in Revisionr62365
LazTarget-
WidgetsetWin32/Win64
Attached Files
  • win32pagecontrol.inc.patch (827 bytes)
    Index: lcl/interfaces/win32/win32pagecontrol.inc
    ===================================================================
    --- lcl/interfaces/win32/win32pagecontrol.inc	(revision 62137)
    +++ lcl/interfaces/win32/win32pagecontrol.inc	(working copy)
    @@ -621,15 +621,8 @@
         exit;
       end;
     
    -  GetLCLClientBoundsOffset(ATabControl, ORect);
    -  if Windows.SendMessage(ATabControl.Handle, TCM_GETITEMRECT, WPARAM(AIndex), LPARAM(@Result)) <> 0
    -  then begin
    -    Result.Top := Result.Top - Orect.Top;
    -    Result.Bottom := Result.Bottom - Orect.Top;
    -    Result.Left := Result.Left - Orect.Left;
    -    Result.Right := Result.Right - Orect.Left;
    -  end
    -  else
    +  if Windows.SendMessage(ATabControl.Handle, TCM_GETITEMRECT, WPARAM(AIndex), LPARAM(@Result)) = 0
    +  then
         Result := inherited GetTabRect(ATabControl, AIndex);
     end;
     
    

Relationships

related to 0036384 closedJuha Manninen Add buttons in find in files results to clean tabs. 

Activities

BrunoK

2019-12-09 12:31

reporter  

win32pagecontrol.inc.patch (827 bytes)
Index: lcl/interfaces/win32/win32pagecontrol.inc
===================================================================
--- lcl/interfaces/win32/win32pagecontrol.inc	(revision 62137)
+++ lcl/interfaces/win32/win32pagecontrol.inc	(working copy)
@@ -621,15 +621,8 @@
     exit;
   end;
 
-  GetLCLClientBoundsOffset(ATabControl, ORect);
-  if Windows.SendMessage(ATabControl.Handle, TCM_GETITEMRECT, WPARAM(AIndex), LPARAM(@Result)) <> 0
-  then begin
-    Result.Top := Result.Top - Orect.Top;
-    Result.Bottom := Result.Bottom - Orect.Top;
-    Result.Left := Result.Left - Orect.Left;
-    Result.Right := Result.Right - Orect.Left;
-  end
-  else
+  if Windows.SendMessage(ATabControl.Handle, TCM_GETITEMRECT, WPARAM(AIndex), LPARAM(@Result)) = 0
+  then
     Result := inherited GetTabRect(ATabControl, AIndex);
 end;
 

Juha Manninen

2019-12-09 20:39

developer   ~0119714

Applied, thanks.

Issue History

Date Modified Username Field Change
2019-12-09 12:31 BrunoK New Issue
2019-12-09 12:31 BrunoK File Added: win32pagecontrol.inc.patch
2019-12-09 17:38 Juha Manninen Relationship added related to 0036384
2019-12-09 20:38 Juha Manninen Assigned To => Juha Manninen
2019-12-09 20:38 Juha Manninen Status new => assigned
2019-12-09 20:39 Juha Manninen Status assigned => resolved
2019-12-09 20:39 Juha Manninen Resolution open => fixed
2019-12-09 20:39 Juha Manninen Fixed in Revision => r62365
2019-12-09 20:39 Juha Manninen LazTarget => -
2019-12-09 20:39 Juha Manninen Widgetset Win32/Win64 => Win32/Win64
2019-12-09 20:39 Juha Manninen Note Added: 0119714