Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > OOP Powerplant for Mac > Runtime Tabs ge...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 403 of 482
Post > Topic >>

Runtime Tabs getting merge with each-other

by "Neel" <nilesh.khemkar@[EMAIL PROTECTED] > Jul 2, 2005 at 01:48 AM

Hi ,
           To dynamically set the tab in LTabscontrol (from one of the
old thread) . I have xml file in which all the tab is define i read the
file and load the tabs , But the problem is
all tabs get mixed with all other existing or new view.
                Firstly, I try to delete all the existing tab in
Ltabcontrol , Secondly according to preferences set by user try to load
tab at runtime. But  suppose i load six tabs at a time then all that
six tabs get merge/overlaped with other, when i switch one tab to other
.. I did call the
TabsControl->Refresh(); function also.
              Whats wrong in this code please suggest.

void AddNormalTabs()
{
	  UInt16  i, count;
	  Str255 l_pTName;
	  LTabsControl *l_pTabs = dynamic_cast<LTabsControl *>(GetLWindow()->

 FindPaneByID(VAR_TABCONTROL));
	 LMultiPanelView *l_pMulti = dynamic_cast<LMultiPanelView
*>(GetLWindow()->   FindPaneByID(SR_MPV));

 if(l_pMulti->GetPanelCount() > 0) 		//Clear all tabs
	{
	  	l_pTabs->SetMaxValue(0);
		  for( i=l_pMulti->GetPanelCount() ; i > 0 ; i-- )
			 l_pMulti->RemovePanel(i);
		  l_pTabs->Refresh();
	}
count = 0;
	for( i = 0; i <
CWorker::GetWorker()->GetConfiguration()->GetUserInterfaceTabCount();
i++)

//Refill the tabs
	{
		    UserInterfaceTab UItab;
		    GetUserInterfaceTab(i, &UItab);
	  	 if(! UItab.hidden)
		   {
			      if(strcmp(UItab.Name.c_str(), TAB_CUSTOM) == 0)		//TODO
			     {
						     	count++;
	           l_pTabs->SetMaxValue(count);
					      	LView *l_pView =
UReanimator::CreateView(GetTabPPobID(&UItab.Name), l_pMulti,
l_pMulti);
			       	l_pMulti->AddPanel(-1, l_pView, count);

				      c2pstrcpy(l_pTName, UItab.Name.c_str());
				      ControlRef l_pCRef =
l_pTabs->GetControlImp()->GetMacControl();
				      ControlTabInfoRec l_CInfo;
				      l_CInfo.version = kControlTabInfoVersionZero;
				      l_CInfo.iconSuiteID = 0;
				      LString::CopyPStr( l_pTName, l_CInfo.name, sizeof(l_pTName));
				      OSStatus l_Val = SetControlData(l_pCRef, count,
kControlTabInfoTag, sizeof(l_CInfo), &l_CInfo);

				      l_pTabs->Refresh();
				      ThrowIfOSStatus_(l_Val);
			}
	}
}


Thanks in advance,
 




 2 Posts in Topic:
Runtime Tabs getting merge with each-other
"Neel" <nile  2005-07-02 01:48:20 
Re: Runtime Tabs getting merge with each-other
"Neel" <nile  2005-07-02 04:31:09 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 1:51:49 CDT 2008.