mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 08:59:13 +02:00
win32: don't add tab is Notebook.ShowTabs = False (bug #0012775)
git-svn-id: trunk@18183 -
This commit is contained in:
parent
e65435e6ab
commit
75f25dfbab
@ -423,12 +423,14 @@ var
|
||||
TCI: TC_ITEM;
|
||||
begin
|
||||
with ANotebook do
|
||||
begin
|
||||
if ShowTabs then
|
||||
begin
|
||||
TCI.Mask := TCIF_TEXT or TCIF_PARAM or TCIF_IMAGE;
|
||||
// store object as extra, so we can verify we got the right page later
|
||||
TCI.lParam := PtrUInt(AChild);
|
||||
TCI.iImage := ANotebook.GetImageIndex(AIndex);
|
||||
{$ifdef WindowsUnicodeSupport}
|
||||
{$ifdef WindowsUnicodeSupport}
|
||||
if UnicodeEnabledOS then
|
||||
begin
|
||||
TCI.pszText := PChar(PWideChar(Utf8Decode(AChild.Caption)));
|
||||
@ -439,13 +441,14 @@ begin
|
||||
TCI.pszText := PChar(Utf8ToAnsi(AChild.Caption));
|
||||
Windows.SendMessage(Handle, TCM_INSERTITEM, AIndex, LPARAM(@TCI));
|
||||
end;
|
||||
{$else}
|
||||
{$else}
|
||||
TCI.pszText := PChar(AChild.Caption);
|
||||
Windows.SendMessage(Handle, TCM_INSERTITEM, AIndex, LPARAM(@TCI));
|
||||
{$endif}
|
||||
{$endif}
|
||||
// clientrect possible changed, adding first tab, or deleting last
|
||||
// windows should send a WM_SIZE message because of this, but it doesn't
|
||||
// send it ourselves
|
||||
end;
|
||||
LCLControlSizeNeedsUpdate(ANotebook, true);
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user