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 » Question and problems around TabCtrl
Question and problems around TabCtrl [message #27546] Thu, 22 July 2010 22:12 Go to previous message
mubeta is currently offline  mubeta
Messages: 77
Registered: October 2006
Member
Hi all,
Windows XP 32 + SP3; MSC9; U++ 2467.

Using TabCtrl with an array of same layout I have this problem:

//main.h

Array<WithlDevice<ParentCtrl> > layer;
TabCtrl                tab;

//main.cpp

void App::DoSomething_1(void)
{
  for(int i=0; i<5; i++) {
    CtrlLayout(layer.At(i));
    tab.Add(layer.At(i).SizePos(), AppImg::...(), t_("...")); 
  }
}

void App::DoSomething_2(void)
{
  for(int z = tab.GetCount() - 1; z > 0; z--) tab.Remove(z);
  tab.ClearFrames();
  tab.GetItem(0).SetImage(Nuller()).Text("");
  layer.Clear();
}


First step:
Calling DoSomething_1() the application will add 5 tabs and all work fine.

Second step:
Calling DoSomething_2() the application will remove 4 of 5 tabs. (Using Reset() result in a system crash, the system crash also if trying to remove alla the 5 tabs).

Third step:
Calling DoSomething_1() again result in a system crash at the line: tab.Add(....);

Questions:
1) It is correct that tab.Reset() result in a system crash? I must leave one tab ?
2) Adding new tabs after remove is not possible?

3) Can be windows problem? or compiler?

Note that the posted code it's only an abstract.
Thanks a lot.
 
Read Message
Read Message
Read Message
Previous Topic: How to change tabctrl background color ?
Next Topic: how to tell which tab is which
Goto Forum:
  


Current Time: Thu Apr 18 20:31:40 CEST 2024

Total time taken to generate the page: 0.02269 seconds