Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Reloading CTabItems in a CTabFolder
Reloading CTabItems in a CTabFolder [message #981648] Mon, 12 November 2012 15:27 Go to next message
Ric Wright is currently offline Ric WrightFriend
Messages: 70
Registered: July 2009
Member
I have a multipage editor. In one of the pages I display one or more
views of some data. The Views are drawn on one or more CTabItems that
are in a CTabFolder. This all works fine. However, during runtime,
the user can change the parameters of the views (and even add or remove
views). So I need to be able to wipe out the current CTabFolder
(and/or its CTabItems) and re-create it.

My question is what is the best approach for this? It's not obvious
how exactly to remove the CTabFolder from the ScrolledForm. I'd prefer
to just remove each of the CTabItems from the folder but it isn't
obvious to me how to do that either. If someone can suggest the right
way or point me to some example code, I would be appreciative.

TIA, Ric
Re: Reloading CTabItems in a CTabFolder [message #981752 is a reply to message #981648] Mon, 12 November 2012 17:09 Go to previous messageGo to next message
Ric Wright is currently offline Ric WrightFriend
Messages: 70
Registered: July 2009
Member
Well, I experimented with simply calling dispose() on each of the
CTabItems in the CTabFolder, then recreating the CTabItems. This seems
to work fine, but am still not sure this is kosher behaviour.

On 2012-11-12 15:27:25 +0000, Ric Wright said:

> I have a multipage editor. In one of the pages I display one or more
> views of some data. The Views are drawn on one or more CTabItems that
> are in a CTabFolder. This all works fine. However, during runtime,
> the user can change the parameters of the views (and even add or remove
> views). So I need to be able to wipe out the current CTabFolder
> (and/or its CTabItems) and re-create it.
>
> My question is what is the best approach for this? It's not obvious
> how exactly to remove the CTabFolder from the ScrolledForm. I'd prefer
> to just remove each of the CTabItems from the folder but it isn't
> obvious to me how to do that either. If someone can suggest the right
> way or point me to some example code, I would be appreciative.
>
> TIA, Ric
Re: Reloading CTabItems in a CTabFolder [message #981883 is a reply to message #981752] Mon, 12 November 2012 19:29 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
That's the only possibility. Note that the children composites are not
disposed when you dispose the CTabItem!

Tom

Am 12.11.12 18:09, schrieb Ric Wright:
> Well, I experimented with simply calling dispose() on each of the
> CTabItems in the CTabFolder, then recreating the CTabItems. This seems
> to work fine, but am still not sure this is kosher behaviour.
>
> On 2012-11-12 15:27:25 +0000, Ric Wright said:
>
>> I have a multipage editor. In one of the pages I display one or more
>> views of some data. The Views are drawn on one or more CTabItems that
>> are in a CTabFolder. This all works fine. However, during runtime,
>> the user can change the parameters of the views (and even add or
>> remove views). So I need to be able to wipe out the current
>> CTabFolder (and/or its CTabItems) and re-create it.
>>
>> My question is what is the best approach for this? It's not obvious
>> how exactly to remove the CTabFolder from the ScrolledForm. I'd
>> prefer to just remove each of the CTabItems from the folder but it
>> isn't obvious to me how to do that either. If someone can suggest the
>> right way or point me to some example code, I would be appreciative.
>>
>> TIA, Ric
>
>
Re: Reloading CTabItems in a CTabFolder [message #982902 is a reply to message #981883] Tue, 13 November 2012 14:11 Go to previous message
Eclipse UserFriend
Thanks Tom. And thanks for pointing out the additional cleanup
required, I'll make sure to take care of those as well.

Ric

On 2012-11-12 19:29:40 +0000, Tom Schindl said:

> That's the only possibility. Note that the children composites are not
> disposed when you dispose the CTabItem!
>
> Tom
>
> Am 12.11.12 18:09, schrieb Ric Wright:
>> Well, I experimented with simply calling dispose() on each of the
>> CTabItems in the CTabFolder, then recreating the CTabItems. This seems
>> to work fine, but am still not sure this is kosher behaviour.
>>
>> On 2012-11-12 15:27:25 +0000, Ric Wright said:
>>
>>> I have a multipage editor. In one of the pages I display one or more
>>> views of some data. The Views are drawn on one or more CTabItems that
>>> are in a CTabFolder. This all works fine. However, during runtime,
>>> the user can change the parameters of the views (and even add or
>>> remove views). So I need to be able to wipe out the current
>>> CTabFolder (and/or its CTabItems) and re-create it.
>>>
>>> My question is what is the best approach for this? It's not obvious
>>> how exactly to remove the CTabFolder from the ScrolledForm. I'd
>>> prefer to just remove each of the CTabItems from the folder but it
>>> isn't obvious to me how to do that either. If someone can suggest the
>>> right way or point me to some example code, I would be appreciative.
>>>
>>> TIA, Ric
Previous Topic:trouble again
Next Topic:Exception in thread "main" java.lang.Error: Unresolved compilation problem
Goto Forum:
  


Current Time: Fri Apr 19 05:46:55 GMT 2024

Powered by FUDForum. Page generated in 0.03892 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top