// JP opened flex table

Click to See Complete Forum and Search --> : Removing Tab of Property Page from Property Sheet


yvsatishkumar
December 11th, 2001, 05:03 AM
Hi

I have two property pages named page1 and page2.

I also have a combo box in page 1 whose options are option1 and option2.

I would like to know how to remove the tab of page2 on clicking the option1 and get back the tab of page2 on clicking the option2.

Experts kindly help

Thanks in advance
Satish

Clifford Hall
December 11th, 2001, 04:12 PM
A rather primitive solution is to try the following:

void CAircraftOpsPage::OnSelchangeCombo1()
{
if (m_testCombo.GetCurSel() == 1)
((CMyParentSheet*)GetParent())->RemovePage(((CMyParentSheet*)GetParent())->m_pMySecondPage);
else
((CMyParentSheet*)GetParent())->AddPage(((CMyParentSheet*)GetParent())->pMySecondPage);
}

This works in Win 98, but has the obvious problem of allowing multiple copies of the same page being added or trying to remove a page that isn't there. It's a start. I think you'll get it from here... Good luck.

solex
December 18th, 2001, 05:49 AM
((CParentSheet*)GetParent())->GetPage(2)->ShowWindow(SW_SHOW or SW_HIDE);




The vast majority of our imports come from outside the country.
George W. Bush

//JP added flex table