View Issue Details

IDProjectCategoryView StatusLast Update
0038788LazarusLCLpublic2021-04-23 23:26
ReporterHamacker Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version2.0.12 
Summary0038788: In GNOME/Windows Enviroment TabVisible hide entire Tab.
DescriptionIn Windows or GNOME enviroment, TabSheet1.TabVisible:=false has the same effect that TabSheet1.Visible:=false and it hide entire Tab.
Steps To ReproduceCode test following code:
for i := 0 to Pred(Paginas.PageCount) do
   PageControl1.Pages[i].TabVisible:=false;
Are hidding all Tabs titles in TPageControl in Delphi, but in GNOME 2.38/Windows10/FPC 3.2 are hidding entire Tab.
To fix problem I need to PageControl1.ShowTabs:=false.
It´s a big problem in all situations that someone porting Delphi to FreePascal/Lazarus.
Additional InformationFPC 3.2
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetGTK 2, Win32/Win64
Attached Files

Activities

Hamacker

2021-04-22 20:58

reporter  

BugReport1.lpi (2,050 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
  <ProjectOptions>
    <Version Value="11"/>
    <PathDelim Value="\"/>
    <General>
      <SessionStorage Value="InProjectDir"/>
      <MainUnit Value="0"/>
      <Title Value="BugReport1"/>
      <Scaled Value="True"/>
      <ResourceType Value="res"/>
      <UseXPManifest Value="True"/>
      <XPManifest>
        <DpiAware Value="True"/>
      </XPManifest>
      <Icon Value="0"/>
    </General>
    <BuildModes Count="1">
      <Item1 Name="Default" Default="True"/>
    </BuildModes>
    <PublishOptions>
      <Version Value="2"/>
      <UseFileFilters Value="True"/>
    </PublishOptions>
    <RunParams>
      <FormatVersion Value="2"/>
      <Modes Count="0"/>
    </RunParams>
    <RequiredPackages Count="1">
      <Item1>
        <PackageName Value="LCL"/>
      </Item1>
    </RequiredPackages>
    <Units Count="2">
      <Unit0>
        <Filename Value="BugReport1.lpr"/>
        <IsPartOfProject Value="True"/>
      </Unit0>
      <Unit1>
        <Filename Value="unit1.pas"/>
        <IsPartOfProject Value="True"/>
        <ComponentName Value="Form1"/>
        <ResourceBaseClass Value="Form"/>
        <UnitName Value="Unit1"/>
      </Unit1>
    </Units>
  </ProjectOptions>
  <CompilerOptions>
    <Version Value="11"/>
    <PathDelim Value="\"/>
    <Target>
      <Filename Value="BugReport1"/>
    </Target>
    <SearchPaths>
      <IncludeFiles Value="$(ProjOutDir)"/>
      <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
    </SearchPaths>
    <Linking>
      <Options>
        <Win32>
          <GraphicApplication Value="True"/>
        </Win32>
      </Options>
    </Linking>
  </CompilerOptions>
  <Debugging>
    <Exceptions Count="3">
      <Item1>
        <Name Value="EAbort"/>
      </Item1>
      <Item2>
        <Name Value="ECodetoolError"/>
      </Item2>
      <Item3>
        <Name Value="EFOpenError"/>
      </Item3>
    </Exceptions>
  </Debugging>
</CONFIG>
BugReport1.lpi (2,050 bytes)   
BugReport1.lpr (411 bytes)   
program BugReport1;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms, Unit1
  { you can add units after this };

{$R *.res}

begin
  RequireDerivedFormResource:=True;
  Application.Scaled:=True;
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.

BugReport1.lpr (411 bytes)   
unit1.lfm (2,179 bytes)   
object Form1: TForm1
  Left = 1246
  Height = 432
  Top = 175
  Width = 654
  Caption = 'Form1'
  ClientHeight = 432
  ClientWidth = 654
  OnCreate = FormCreate
  LCLVersion = '2.0.12.0'
  object ToggleBox1: TToggleBox
    Left = 24
    Height = 25
    Top = 15
    Width = 119
    Caption = 'Hide All Tabs'
    OnChange = ToggleBox1Change
    TabOrder = 0
  end
  object ToggleBox2: TToggleBox
    Left = 160
    Height = 25
    Top = 16
    Width = 163
    Caption = 'Show All tabs'
    OnChange = ToggleBox2Change
    TabOrder = 1
  end
  object PageControl1: TPageControl
    Left = 32
    Height = 336
    Top = 72
    Width = 600
    ActivePage = TabSheet3
    TabIndex = 2
    TabOrder = 2
    object TabSheet1: TTabSheet
      Caption = 'TabSheet1'
      ClientHeight = 308
      ClientWidth = 592
      object Label1: TLabel
        Left = 0
        Height = 308
        Top = 0
        Width = 592
        Align = alClient
        Alignment = taCenter
        Caption = 'Tab #1'
        Font.Height = 44
        Font.Style = [fsBold, fsUnderline]
        Layout = tlCenter
        ParentColor = False
        ParentFont = False
      end
    end
    object TabSheet2: TTabSheet
      Caption = 'TabSheet2'
      ClientHeight = 308
      ClientWidth = 592
      object Label2: TLabel
        Left = 0
        Height = 308
        Top = 0
        Width = 592
        Align = alClient
        Alignment = taCenter
        Caption = 'Tab #2'
        Font.Height = 44
        Font.Style = [fsBold, fsUnderline]
        Layout = tlCenter
        ParentColor = False
        ParentFont = False
      end
    end
    object TabSheet3: TTabSheet
      Caption = 'TabSheet3'
      ClientHeight = 308
      ClientWidth = 592
      object Label3: TLabel
        Left = 0
        Height = 308
        Top = 0
        Width = 592
        Align = alClient
        Alignment = taCenter
        Caption = 'Tab #3'
        Font.Height = 44
        Font.Style = [fsBold, fsUnderline]
        Layout = tlCenter
        ParentColor = False
        ParentFont = False
      end
    end
  end
end
unit1.lfm (2,179 bytes)   
unit1.pas (1,130 bytes)   
unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls;

type

  { TForm1 }

  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    TabSheet2: TTabSheet;
    TabSheet3: TTabSheet;
    ToggleBox1: TToggleBox;
    ToggleBox2: TToggleBox;
    procedure FormCreate(Sender: TObject);
    procedure ToggleBox1Change(Sender: TObject);
    procedure ToggleBox2Change(Sender: TObject);
  private

  public

  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.FormCreate(Sender: TObject);
begin
  PageControl1.PageIndex:=0;
end;

procedure TForm1.ToggleBox1Change(Sender: TObject);
var
  i:Integer;
begin
  for i:=0 to Pred(PageControl1.PageCount) do
   PageControl1.Pages[i].TabVisible:=false;
end;

procedure TForm1.ToggleBox2Change(Sender: TObject);
var
  i:Integer;
begin
  for i:=0 to Pred(PageControl1.PageCount) do
   PageControl1.Pages[i].TabVisible:=true;

end;

end.

unit1.pas (1,130 bytes)   

Michl

2021-04-22 21:26

developer   ~0130528

> To fix problem I need to PageControl1.ShowTabs:=false.

What's wrong with that?

Bart Broersma

2021-04-23 23:26

developer   ~0130554

@Hamacker: please attach the sample project as one zipped file, the .lps and .res files can be omitted.

Issue History

Date Modified Username Field Change
2021-04-22 20:58 Hamacker New Issue
2021-04-22 20:58 Hamacker File Added: BugReport1.lpi
2021-04-22 20:58 Hamacker File Added: BugReport1.lpr
2021-04-22 20:58 Hamacker File Added: BugReport1.lps
2021-04-22 20:58 Hamacker File Added: BugReport1.res
2021-04-22 20:58 Hamacker File Added: unit1.lfm
2021-04-22 20:58 Hamacker File Added: unit1.pas
2021-04-22 21:12 Michl Status new => feedback
2021-04-22 21:12 Michl LazTarget => -
2021-04-22 21:13 Michl Status feedback => new
2021-04-22 21:26 Michl Note Added: 0130528
2021-04-23 23:26 Bart Broersma Note Added: 0130554
2021-04-28 12:26 Juha Manninen File Deleted: BugReport1.lps
2021-04-28 12:26 Juha Manninen File Deleted: BugReport1.res