Jump to content

Hide Tabs from UniPageControl


codeb

Recommended Posts

Solution:

 

Hide:

UniSession.AddJS(UniPageControl1.JSName + '.tabPanel.hide();');

 

Show:

UniSession.AddJS(UniPageControl1.JSName + '.tabPanel.show();');

 

http://forums.unigui.com/index.php?/topic/2939-how-to-hide-header/&do=findComment&comment=17616

 

 

or hide / show by index, example index=2

 

Hide:

UniSession.AddJS(UniPageControl1.JSName + '.items.getAt(0).items.getAt(2).tab.hide();');

 

Show:

UniSession.AddJS(UniPageControl1.JSName + '.items.getAt(0).items.getAt(2).tab.show();');

Link to comment
Share on other sites

Thanks on answer, but

Where to put this line... I put it on UniPageControl ->UniEvents -> afterCreate then I get blank screen,

put on

UniEvents->beforeInit (same result)...

ExtEvents->afterRender (same result)

ExtEvents->beforeRender (same result)....

 

Where to put it??????

 

Link to comment
Share on other sites

in runtime:

uses ... UniGUIApplication ...
procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  UniSession.AddJS(UniPageControl1.JSName + '.items.getAt(0).items.getAt(2).tab.hide();');
end;

Or

runtime or desingtime:

 

UniTabSheet1.TabVisible := False;

UniTabSheet2.TabVisible := False;

 

....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...