mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 13:37:45 +02:00
win32: changing border style by changing exstyle does not work for ListView -> use RecreateWnd (fixes part of issue #0013182)
git-svn-id: trunk@18752 -
This commit is contained in:
parent
c84b3499e1
commit
4c55ecc090
@ -680,19 +680,11 @@ begin
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomListView.SetBorderStyle(const AWinControl: TWinControl; const ABorderStyle: TBorderStyle);
|
||||
var
|
||||
Handle: HWND;
|
||||
StyleEx: PtrInt;
|
||||
begin
|
||||
if not WSCheckHandleAllocated(AWinControl, 'TWin32WSCustomListView.SetBorder') then
|
||||
Exit;
|
||||
Handle := AWinControl.Handle;
|
||||
StyleEx := GetWindowLong(Handle, GWL_EXSTYLE);
|
||||
if ABorderStyle = TBorderStyle(bsSingle) Then
|
||||
StyleEx := StyleEx or WS_EX_CLIENTEDGE
|
||||
else
|
||||
StyleEx := StyleEx and not WS_EX_CLIENTEDGE;
|
||||
SetWindowLong(Handle, GWL_EXSTYLE, StyleEx);
|
||||
// changing border style by changing EXSTYLE here does not work correctly
|
||||
RecreateWnd(AWinControl);
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomListView.SetColor(const AWinControl: TWinControl);
|
||||
|
Loading…
Reference in New Issue
Block a user