Reloading CTabItems in a CTabFolder [message #981648] |
Mon, 12 November 2012 10:27  |
Eclipse User |
|
|
|
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 14:29   |
Eclipse User |
|
|
|
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 09:11  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.13181 seconds