Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Page Navigation Control.... 2 Collapse All
Subject Author Date
Sergio Buonanno Aug 8, 2008 - 2:38 AM

I post once again my question because I noticed that it was ignored so far (I really need your help)....


I have an application with MS Outlook look and feel. The page navigation control on the left is divided in two panes: a standard pane and a Favorites pane. The Favorites pane is located at the top of the navigation control as in Outlook and its height is calculated in the following way:



The height must be enough to show all the tree items inside the control but it cannot be higher than half of the entire navigation control client area that is occupied by the Favorites and Main tree controls (each inside a pane), because the Standard Tree (that looks like the Main Folders in Outlook) has higher priority and it must occupied an area that at least is half the height of the page navigation control client area, and it can never be shorter than the Favorites tree control. The behavior of my application is slightly different from that of Outlook, where the Favorites pane has higher priority and its height could be higher than that of the Main Folders’. In my case is exactly the opposite, even if the UI of the page navigation control is exactly like Outlook’s.



I succeed to manage this situation when the page navigation control is docked to the application main window using the methods:

CExtPageNavigatorWnd::ITEM_PANE_INFO->HeightSet(hFavPane);



CExtPageNavigatorWnd::ITEM_PANE_INFO->HeightSet(hMainPane);




(In other words: hFavPane cannot be greater than hMainPane and in any case it must be <= of half the page navigation control client area’s height)




But that doesn’t work when the navigation pane is floating. May you please suggest me a better way to calculate and set panes height at run-time so that I can have full control in settings panes’ height especially when the page navigation control is floating and not docked ?




 


 


Sergio Buonanno Aug 13, 2008 - 6:51 AM

I’m sorry, I had a problem with the Paste command....my code is:


CExtPageNavigatorWnd::PAGE_ITEM_INFO *pPage = m_pParentNav->ItemGetInfo(m_iPage /*idxPage*/); 

CExtPageNavigatorWnd::ITEM_PANE_INFO *pPane1 = pPage->PaneGetInfo(INDEX_PANE_FAVORITES);

CExtPageNavigatorWnd::ITEM_PANE_INFO *pPane2 = pPage->PaneGetInfo(INDEX_PANE_NAVIGATION);


CRect rcPage;

m_pParentNav->GetClientRect(rcPage);

int iMinH = (rcPage.Height() / 2) - 10;

long lHalfH = iMinH / 2;


The value of lHalfH is the problem, because m_pParentNav->GetClientRect(rcPage) fails to return the correct value when the pane is floating. I need to calculate the value of half the height of the Page Navigation control’s client area and that doesn’t work correctly when the Page Navigation control is floating.

Sergio Buonanno Aug 13, 2008 - 6:47 AM


CExtPageNavigatorWnd::PAGE_ITEM_INFO *pPage = m_pParentNav->ItemGetInfo(m_iPage



/*idxPage*/); int iMinH = (rcPage.Height() / 2) - 10;if (iMinH < 150)long lHalfH = iMinH / 2;


CExtPageNavigatorWnd::ITEM_PANE_INFO *pPane1 = pPage->PaneGetInfo(INDEX_PANE_FAVORITES);


CExtPageNavigatorWnd::ITEM_PANE_INFO *pPane2 = pPage->PaneGetInfo(INDEX_PANE_NAVIGATION);


 


CRect rcPage;


m_pParentNav->GetClientRect(rcPage);


 


 


    iMinH = 150;


 

Sergio Buonanno Aug 13, 2008 - 6:47 AM


CExtPageNavigatorWnd::PAGE_ITEM_INFO *pPage = m_pParentNav->ItemGetInfo(m_iPage



/*idxPage*/); int iMinH = (rcPage.Height() / 2) - 10;if (iMinH < 150)long lHalfH = iMinH / 2;


CExtPageNavigatorWnd::ITEM_PANE_INFO *pPane1 = pPage->PaneGetInfo(INDEX_PANE_FAVORITES);


CExtPageNavigatorWnd::ITEM_PANE_INFO *pPane2 = pPage->PaneGetInfo(INDEX_PANE_NAVIGATION);


 


CRect rcPage;


m_pParentNav->GetClientRect(rcPage);


 


 


   iMinH = 150;


 

Sergio Buonanno Aug 13, 2008 - 6:47 AM


CExtPageNavigatorWnd::PAGE_ITEM_INFO *pPage = m_pParentNav->ItemGetInfo(m_iPage



/*idxPage*/); int iMinH = (rcPage.Height() / 2) - 10;if (iMinH < 150)long lHalfH = iMinH / 2;


CExtPageNavigatorWnd::ITEM_PANE_INFO *pPane1 = pPage->PaneGetInfo(INDEX_PANE_FAVORITES);


CExtPageNavigatorWnd::ITEM_PANE_INFO *pPane2 = pPage->PaneGetInfo(INDEX_PANE_NAVIGATION);


 


CRect rcPage;


m_pParentNav->GetClientRect(rcPage);


 


 


  iMinH = 150;


 

Sergio Buonanno Aug 13, 2008 - 6:47 AM


CExtPageNavigatorWnd::PAGE_ITEM_INFO *pPage = m_pParentNav->ItemGetInfo(m_iPage



/*idxPage*/); int iMinH = (rcPage.Height() / 2) - 10;if (iMinH < 150)long lHalfH = iMinH / 2;


CExtPageNavigatorWnd::ITEM_PANE_INFO *pPane1 = pPage->PaneGetInfo(INDEX_PANE_FAVORITES);


CExtPageNavigatorWnd::ITEM_PANE_INFO *pPane2 = pPage->PaneGetInfo(INDEX_PANE_NAVIGATION);


 


CRect rcPage;


m_pParentNav->GetClientRect(rcPage);


 


 


 iMinH = 150;


 

Technical Support Aug 12, 2008 - 1:37 PM

Unfortunately we failed to reproduce this bug. Here is the test project in which a page navigator is created inside a control bar. You can make the control bar floating and make sure that the panes are resized correctly. Would you create a new one or modify this project to reproduce the problem and send it to us?

TestPageNavigatorInsideCB.zip