Home » U++ Library support » TabCtrl » Question and problems around TabCtrl
Question and problems around TabCtrl [message #27546] |
Thu, 22 July 2010 22:12 |
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.
|
|
|
Goto Forum:
Current Time: Sun May 19 16:35:35 CEST 2024
Total time taken to generate the page: 0.01042 seconds
|