Recent

Author Topic: Error: identifier idents no member "SetVisible" ???  (Read 9201 times)

nicolas_lazarus

  • New Member
  • *
  • Posts: 42
Error: identifier idents no member "SetVisible" ???
« on: November 15, 2010, 09:30:31 pm »
Hi all,

I was looking for the solution for a while about ( Error: identifier idents no member "SetVisible").

As far I read, it is  due the fcp version , is it right ??
Code: [Select]
    if TabSheetLogs.Visible then
    begin
    TabSheetLogs.SetVisible(false);
    end ;


my fpc version is :
Free Pascal Compiler version 2.5.1 [2010/11/11] for x86_64
Copyright (c) 1993-2010 by Florian Klaempfl

My Lazarus IDE version is:  0.9.29


Regards,
Nicolas

ivan17

  • Full Member
  • ***
  • Posts: 173
Re: Error: identifier idents no member "SetVisible" ???
« Reply #1 on: November 15, 2010, 11:43:06 pm »
just do    TabSheetLogs.Visible := false;

while that method does exist, it is not public so you can't call it from the programs you write.

nicolas_lazarus

  • New Member
  • *
  • Posts: 42
Re: Error: identifier idents no member "SetVisible" ???
« Reply #2 on: November 16, 2010, 01:59:44 am »
Hola Ivan,


Thanks,
Actually the way that I 've found to close/hide the " TabSheetLogs: TTabSheet"  component is by using next method :

TabSheetLogs.TabVisible:=false

PageControlTabsInferiores <-- TabSheetLogs.

Regards

Nicolas


ivan17

  • Full Member
  • ***
  • Posts: 173
Re: Error: identifier idents no member "SetVisible" ???
« Reply #3 on: November 16, 2010, 01:17:59 pm »
if i recall correctly, TabVisible just hides the tab (the little thingy in the top row) while Visible hides the entire sheet. not that there is much difference (usually), but still use Visible.

mas steindorff

  • Hero Member
  • *****
  • Posts: 532
Re: Error: identifier idents no member "SetVisible" ???
« Reply #4 on: November 16, 2010, 04:37:45 pm »
if i recall correctly, TabVisible just hides the tab (the little thingy in the top row) while Visible hides the entire sheet. not that there is much difference (usually), but still use Visible.
you can get to tabsheets without tabs using the keyboard.
(edited: I take this back, now I can't do it)
« Last Edit: November 17, 2010, 08:15:26 pm by mas steindorff »
windows 10 &11, Ubuntu 21+ - fpc 3.0.4, IDE 2.0 general releases

nicolas_lazarus

  • New Member
  • *
  • Posts: 42
Re: Error: identifier idents no member "SetVisible" ???
« Reply #5 on: November 16, 2010, 10:57:14 pm »
Hi all,

it is weird  , the method:  TabSheetLogs.Visible := false;   doesn't take effect ... ..why ? I really don't know.


Code: [Select]
procedure TForm1.VerTabLogs();
begin
    if TabSheetLogs.TabVisible then
    begin

    //TabSheetLogs.TabVisible:=false;
    TabSheetLogs.Visible:=false;

    PageControlTabsInferiores.ActivePage:=TabSheetSelectorArchivos;
    end
    else
    begin

    //TabSheetLogs.TabVisible:=true;
    TabSheetLogs.Visible:=true;

    TabSheetLogs.Show;
     PageControlTabsInferiores.ActivePage:=TabSheetLogs;
    end;
end;


procedure TForm1.VerSelectorArchivos();
begin

    if TabSheetSelectorArchivos.TabVisible then
    begin

    //TabSheetSelectorArchivos.TabVisible:=false;
    TabSheetSelectorArchivos.Visible:=false;

    PageControlTabsInferiores.ActivePage:=TabSheetLogs;
    end
     else
    begin

    //TabSheetSelectorArchivos.TabVisible:=true;
    TabSheetSelectorArchivos.Visible:=true;
   

   TabSheetSelectorArchivos.Show;
    PageControlTabsInferiores.ActivePage:=TabSheetSelectorArchivos;
    end;
end;

please, take a look to the pictures below

visible.png  and notVisible.png   are the result after use the method "TabSheetSelectorArchivos.TabVisible:=true"

mas steindorff

  • Hero Member
  • *****
  • Posts: 532
Re: Error: identifier idents no member "SetVisible" ???
« Reply #6 on: November 17, 2010, 05:03:25 pm »
I have a working program that only shows the pages of interest. My program hides the pages with
Code: [Select]
pageControl1.pages[x].TabVisible:= false;
I use the pagecontrol, not the tabsheet which is a child of the page control.

The .page[] is a tabsheet and this should be the same as setting the tabsheet directly.  try using the page and see if you found a bug
windows 10 &11, Ubuntu 21+ - fpc 3.0.4, IDE 2.0 general releases

ivan17

  • Full Member
  • ***
  • Posts: 173
Re: Error: identifier idents no member "SetVisible" ???
« Reply #7 on: November 17, 2010, 08:09:44 pm »
contrary to what i stated before, Visible property on a TTabSheet does nothing good (don't use it, it hides things on the tabsheet, but they are made visible again when you switch to the tab again (which it doesn't prevent you from doing) ), while TabVisible does the job.

the behavior (except from keyboard) is identical to that of delphi 7 so it is not really a bug.
« Last Edit: November 17, 2010, 08:14:39 pm by ivan17 »

nicolas_lazarus

  • New Member
  • *
  • Posts: 42
Re: Error: identifier idents no member "SetVisible" ???
« Reply #8 on: November 19, 2010, 03:39:56 pm »
Hi all !

Thanks !

summarizing :

Code: [Select]
procedure TForm1.VerTabLogs();
begin
    VerPanelExploradorDirectorios();

    if TabSheetLogs.TabVisible then
    begin
    PageControlTabsInferiores.Pages[1].TabVisible := false;
    end
    else
    begin
     PageControlTabsInferiores.Pages[1].TabVisible := true;
     PageControlTabsInferiores.ActivePage := TabSheetLogs;
    end;
   OcultarPanelControlTabsInferiores();
end;


procedure TForm1.VerSelectorArchivos();
begin
     VerPanelExploradorDirectorios();

    if TabSheetSelectorArchivos.TabVisible then
    begin
    PageControlTabsInferiores.Pages[0].TabVisible := false;
    PageControlTabsInferiores.ActivePage := TabSheetLogs;
    end
     else
    begin
    PageControlTabsInferiores.Pages[0].TabVisible := true;
    PageControlTabsInferiores.ActivePage := TabSheetSelectorArchivos;
    end;
    OcultarPanelControlTabsInferiores();
end;


Regards,

Nicolas

 

TinyPortal © 2005-2018