Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TabCtrl » A few questions regarding TabCtrl
Re: A few questions regarding TabCtrl [message #36748 is a reply to message #36744] Sun, 01 July 2012 18:39 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

lectus wrote on Sat, 30 June 2012 17:19

1) How do I use the same layout (created by Layout editor) to create multiple tabs?
* I tried tabctrl.Add(tab) but it only shows the contents 1 time, then I get empty tabs.

Each widget can be added only once. Second call of Add() removes Ctrl from its previous parent before adding to a new one. This applies to all Ctrls, not only tabs. If you want to have the same thing in two locations, you have to create two instances of it. E.g.:
WithMyLayout<ParentCtrl> tab1;
WithMyLayout<ParentCtrl> tab1;

tabctrl.Add(tab1);
tabctrl.Add(tab2);


Best regards,
Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to change Tab name
Next Topic: Why not drop ParentCtrl pane and add Ctrls directly to TabBarCtrl?
Goto Forum:
  


Current Time: Thu May 23 18:04:29 CEST 2024

Total time taken to generate the page: 0.01206 seconds