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 Collapse All
Subject Author Date
Sergio Buonanno May 12, 2006 - 9:09 AM

If have a CExtPageNavigator object with some problems with panes. When I start my application I load a Tree View Control with some favorite items (it looks like Microsoft Outlook) in the top pane (I have 2 panes exactly like Outlook). The problem is that when I load favorites from an external file and the Page Navigator is docked and hidden (Auto hide property of its parent Control Bar set to true) the method ItemRectGet of CExtPageNavigatorWnd::ITEM_PANE_INFO returns 0. It looks like it returns the height of the pane when it was first created not considering that I have changed the height by calling HeightSet further on in my code. When the Page Navigator is shown (auto hide property set to false), it works fine. Any hint?

Technical Support May 13, 2006 - 12:36 PM

The resizable control bar adjusts the size of its child window only when this adjustment is needed. This behavior is implemented for optimization reasons. The auto-hidden control bar is simply a hidden control bar. The window which is sliding out from the grouped auto-hidden tabs is an auto-hide slider and it is not a control bar. The child window of the resizable control bar window is temporarily moved into this auto-hide slider window when it needs to be shown. The child window of the resizable control bar window is moved back into the bar when the auto-hide slider window needs to be hidden.

You should not think about the size of the panes inside the page navigator window. These panes may become zero sized if the size of the parent control bar is quite small.

Sergio Buonanno May 15, 2006 - 2:37 AM

I didn’t make myself clear. The problem isn’t the parent Control Bar, the problem is the Page Navigator Control pane. The Page Navigator doesn’t resize the top pane as I’d like when it is hidden, I mean when the parent Control Bar has the auto-hide property set to true (as I told you there are 2 panes in my Page Navigator and their height depends on the number of items displayed in their child Tree View control. Same behavior of MS Outlook) so that, when the User Open the Navigator Control the top pane appears with a wrong height. This in case the Navigator Control top pane’s Tree View control is filled with new items and its height is changed while it’s hidden.
All this to just say that any call to CExtPageNavigatorWnd::ITEM_PANE_INFO:::HeightSet(…), when the Page Navigator is hidden does nothing, and when the user open the hidden Page Navigator (hovering on the parent Control Bar’ tab), the top pane appears with the height it was created with and not with the height I set later after loading favorite items from an external file. The pane’s height is set but the pane is not updated before is displayed. If I dock the Navigator Control and I make it visible (I mean auto-hide off) everything works fine, therefore the problem is only when the auto-hide property is true.

Technical Support May 15, 2006 - 7:54 AM

The windows inside resizable bars and inside the page navigator cannot be strongly restricted in size. Please run the PageNavigator sample application and select the Mail page. The Favorite Folders pane inside the Mail page is restricted to have some constant height and contains a static control with the Drag Your Favorite Folders Here text. If you decrease the height of the main frame window, the height of the page navigator window will also be decreased and you can reach the state when the height of the Favorite Folders static gets very small and even equal to zero. The same can occur with the page navigator window inside the resizable control bar window. That is why we do not perform any adjustment of the window size for the windows inside invisible resizable control bars. Any window must be ready to have a zero width and/or height. If some control crashes in these cases and/or restores its state incorrectly, then this control is not bug free.

We guess you would like the tab page navigator and its contained windows never have a zero size due to some specific conditions. It is possible to create some container window which is a child of the resizable control bar or dynamic auto-hide slider and parent of the page navigator window. This container window will resize its child page navigator to fit all the container’s client area. If the client area is enough small, then the child page navigator window will be resized to some minimal size. Please let us know whether this solution is acceptable for you?

Sergio Buonanno May 15, 2006 - 8:18 AM

The problem is not the 0 height. The problem is that the Page Navigator’s pane doesn’t adjust its size when its parent Page Navigator control is being displayed (mouse pointer hovers over Control Bar’s tab); it remains with its original height and the height I set by calling CExtPageNavigatorWnd::ITEM_PANE_INFO:HeightSet () is totally ignored. The pane should update its size when is displayed instead it will remain with the height it was created with.
If the original height is set to 10 pixels, it will remain so even if I call HeightSet(20). The pane’s height variable is updated but the Page Navigator control’s User Interface isn’t changed even when the user displays the hidden Page Navigator. Instead, if I call CExtPageNavigatorWnd::ITEM_PANE_INFO:::HeightSet(…) with Page Navigator visible, it works just fine, I don’t think this behavior is correct otherwise to change pane’s height (and have the correct visual aspect updated) I must display the Page Navigator, set the new height and then hide the Page Navigator control once again.
It must be a way to have the height changed when the Page Novigator control is hidden and visual aspect of the pane updated when the Page Navigator is displayed by the user.
Probably I’m doing something wrong somewhere in my code, but why when the Pane is visible haven’t I any problems (using exactly the same height values) ?

Technical Support May 15, 2006 - 11:46 AM

We failed to reproduce the problem with the modified version of the PageNavigator sample and the latest version of Prof-UIS. We sent the details and the sample to you by e-mail.