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 > Need help with ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 9 Topic 430 of 483
Post > Topic >>

Need help with CViewColumn Class

by "Neel" <nilesh.khemkar@[EMAIL PROTECTED] > Nov 24, 2005 at 03:17 AM

Hi
      I have inherited class from CViewColumn. I placed An Add button
over the dialog, When I press Add button,  I am adding some new values
to the CLIstView
Say "Tom" and " 20year"
but this doesn't get displayed in my ListView, However when I add next
time say
"Thom"   and "30Year"
My List view shows both values as

Tom   20 year
Thom 30year

Here is the code - snippet to add new value in ListView
/*******************************************************/
LView *l_pRowView;
	int f_iIX=0;
	LStr255 l_strValue;
	char l_oBuffer[200];

	CViewColumn *l_pDView = dynamic_cast<CViewColumn
*>(GetLWindow()->FindPaneByID(DM_EVIEW));
	for(f_iIX = l_pDView->GetPaneCount(); f_iIX > 0; f_iIX--)
 {
	    	l_pDView->RemoveSubPane(l_pDView->GetSubPane(f_iIX));
	 }

  l_pDView->Refresh();
	 std::string l_oName, l_oAge, l_oDescription;
	for(f_iIX = 0; f_iIX < m_oObject.GetNumberOfElements(); ++f_iIX)
	{
		  l_pDView->CreateSubPane(f_iIX +1, DM_EVIEW_ROW, Refresh_Yes);
		  l_pRowView = dynamic_cast<LView *>(l_pDView->GetSubPane(f_iIX +1));

	   	m_oObject.GetName(f_iIX + 1, &l_oName);
	  	 m_oObject.GetAge(f_iIX + 1, &l_oAge);
		   m_oObject.GetDescription(l_oName, l_oAge, &l_oDescription);

		  dynamic_cast<LStaticText
*>(l_pRowView->FindPaneByID(DM_EDIT_BCD))->SetText((char *)
   l_oName.c_str(), l_oName.size());
		dynamic_cast<LStaticText
*>(l_pRowView->FindPaneByID(DM_EDIT_SYM))->SetText((char *)
l_oAge.c_str(), l_oAge.size());
		dynamic_cast<LStaticText
*>(l_pRowView->FindPaneByID(DM_EDIT_DEC))->SetText((char *)
l_oDescription.c_str(), l_oDescription.size());

 	}

l_pDView->Refresh();

/*********************************************/
Debugging result shows that the value in l_oName &l_oAge is coming
same, Also the for loop executed first time, so the complete code is
executing but still not showing the result.

Is this the problem of List View or Am I missing some value. Any help
in this regard would be appreciated

Thanks & Regards,
 




 9 Posts in Topic:
Need help with CViewColumn Class
"Neel" <nile  2005-11-24 03:17:56 
Re: Need help with CViewColumn Class
David Phillip Oster <o  2005-11-25 06:33:40 
Re: Need help with CViewColumn Class
"Neel" <nile  2005-11-25 07:13:05 
Re: Need help with CViewColumn Class
"Neel" <nile  2005-11-25 07:25:32 
Re: Need help with CViewColumn Class
David Phillip Oster <o  2005-11-25 19:49:45 
Re: Need help with CViewColumn Class
"Neel" <nile  2005-11-29 01:46:23 
Re: Need help with CViewColumn Class
David Phillip Oster <o  2005-11-29 17:43:29 
Re: Need help with CViewColumn Class
"Neel" <nile  2005-12-04 21:32:22 
Re: Need help with CViewColumn Class
David Phillip Oster <o  2005-12-05 05:47:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Sat Jul 19 23:50:01 CDT 2008.