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    | 
		 
		
			| 
				
	 | 
 
	
		| 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
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
  
 
Goto Forum:
 
 Current Time: Tue Nov 04 11:28:04 CET 2025 
 Total time taken to generate the page: 0.06466 seconds 
 |