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 » how to tell which tab is which
how to tell which tab is which [message #28097] Mon, 16 August 2010 05:04 Go to next message
mtdew3q is currently offline  mtdew3q
Messages: 181
Registered: July 2010
Location: Upstate, NY (near Canada)
Experienced Member

hi-

If I use the Add method to add a control, how do I get the Id of the individual tab I want to add the control to?

WithSLCMHCalLayout<TopWindow> t1;

CtrlLayout(t1);
t1.SizePos();
iTab.Add("Tab1").Slave(&t1);
iTab.Add("Tab2").Slave(&t1);

Add(iCal.LeftPosZ(92, 180).TopPosZ(166, 156));

In the code above, iCal is a Calendar control. iTab is of type TabCtrl.

thanks for any assistance-
jim
Re: how to tell which tab is which [message #28099 is a reply to message #28097] Mon, 16 August 2010 08:30 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Jim

I do not understand you well. Where are you adding iCal?. If t1 is of type TopWindow, it is strange to add it to a TabCtrl.

However, this could serve to you:

WithSLCMHCalLayout<StaticRect> t1, t2;

iTab.Add(t1.SizePos(), t_("Tab 1"));
iTab.Add(t2.SizePos(), t_("Tab 2"));

....

Item &myTab = iTab.GetItem(iTab.Find(t2));
myTab.Disable();   // Now tab where t2 is located, is disabled


Best regards
Iñaki
Re: how to tell which tab is which [message #28106 is a reply to message #28099] Tue, 17 August 2010 01:02 Go to previous messageGo to next message
mtdew3q is currently offline  mtdew3q
Messages: 181
Registered: July 2010
Location: Upstate, NY (near Canada)
Experienced Member

hi Koldo-

That is exactly the code snippet and explanation I was looking for. I know I didn't code it right. Now I will be able to use tab controls with more practice and studying hopefully. I need to hit the manual and really practice in my spare time after work.

Thanks very much for the tip,
jim
Re: how to tell which tab is which [message #28109 is a reply to message #28106] Tue, 17 August 2010 08:14 Go to previous message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Smile

Best regards
Iñaki
Previous Topic: Question and problems around TabCtrl
Next Topic: TabCtrl (or equivalen) with tabs on left side
Goto Forum:
  


Current Time: Thu Mar 28 17:26:14 CET 2024

Total time taken to generate the page: 0.01218 seconds