Thanks a lot!
Valeriy Onuchin wrote:
> Hi,
> the code contains small error.
> I also added Bool_t TGTab::SetTab(const char *name) method.
> All 3 methods will appear in CVS shortly.
>
> Regards. Valeriy
>
>
> Valeriy Onuchin wrote:
>
>
>>Thomas Bretz wrote:
>>
>>
>>>Hi,
>>>
>>>is it possible to implement a Getter which returns the tab by name
>>>instead of number?
>>>
>>>Thomas.
>>
>>Hi Thomas,
>>here is the code.
>>
>>Regards. Valeriy
>>
>>//______________________________________________________________________________
>>TGCompositeFrame *TGTab::GetTabContainer(const char *name) const
>>{
>> // Return the tab container of tab with string name.
>> // Returns 0 in case name is not found.
>>
>> TGFrameElement *el;
>> TGTabElement *tab = 0;
>> TGCompositeFrame *comp = 0;
>>
>> TIter next(fList);
>> next(); // skip first container
>>
>> while ((el = (TGFrameElement *) next())) {
>> el = (TGFrameElement *) next();
>> comp = (TGCompositeFrame *) el->fFrame;
>> next();
>> tab = (TGTabElement *)el->fFrame;
>> if (name == *(tab->GetText())) {
>> return comp;
>> }
>> }
>>
>> return 0;
>>}
>>
>>//______________________________________________________________________________
>>TGTabElement *TGTab::GetTabTab(const char *name) const
>>{
>> // Return the tab element of tab with string name.
>> // Returns 0 in case name is not found.
>>
>> TGFrameElement *el;
>> TGTabElement *tab = 0;
>>
>> TIter next(fList);
>> next(); // skip first container
>>
>> while ((el = (TGFrameElement *) next())) {
>> next();
>> tab = (TGTabElement *)el->fFrame;
>> if (name == *(tab->GetText())) {
>> return tab;
>> }
>> }
>>
>> return 0;
>>}
>
>
Received on Tue Apr 19 2005 - 11:28:58 MEST