![]() |
TaskPanel - AddControlItem |
Post Reply ![]() |
Author | |
kram617 ![]() Newbie ![]() Joined: 24 February 2006 Status: Offline Points: 12 |
![]() ![]() ![]() ![]() ![]() Posted: 04 April 2007 at 8:16am |
Hello,
I am trying to use TaskPanel with Version 9.70. I have created two groups and I use AddControlItem to add a child window to each group. (One group has a list box, the other group has a tree control.) I am currently using xtpTaskPanelThemeListViewOffice2003 for my theme, so I can have an Outlook 2003 look.
The problem I am having is that switching between groups doesn't make my child windows visible. For example, if I have Group 1 expanded and am looking at my tree control, then I click to expand Group 2, I don't see my list box. But I click back onto Group 1, I still see my tree control. However, after expanding Group 2, if I resize the window, the list box will then reappear. But then I click back to expand Group 1, and my tree control isn't visible.
It's as if only one CXTPTaskPanelGroupItem can be visible at a time, regardless of whether they are in seperate groups.
If anybody can help me, you have my thanks.
----------------------------------------------------------------
BTW, here is my code for creating the Task Panel and contents, if this is any help....
if (m_TaskPanel.Create(WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN , CXTPEmptyRect(), this, IDC_TASKPANEL))
{ m_TaskPanel.SetTheme(xtpTaskPanelThemeListViewOffice2003); m_TaskPanel.SetBehaviour(xtpTaskPanelBehaviourToolbox); m_TaskPanel.SetSelectItemOnFocus(TRUE); m_pItemLayoutGroup = m_TaskPanel.AddGroup(IDS_WORKSPACE_ITEMLAYOUT);
m_pReportViewGroup = m_TaskPanel.AddGroup(IDS_WORKSPACE_REPORTVIEW); m_pReportViewGroup->SetExpanded(TRUE); m_treeItemLayout.Create(WS_CHILD | WS_VISIBLE | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_INFOTIP | TVS_SHOWSELALWAYS, CXTPEmptyRect(), &m_TaskPanel, IDC_WORKSPACE_TREE_SECTIONS); m_pItemLayoutItem = m_pItemLayoutGroup->AddControlItem(m_treeItemLayout.GetSafeHwnd()); m_lstReportSections.Create(WS_CHILD | WS_VISIBLE | LBS_STANDARD | WS_HSCROLL, CXTPEmptyRect(), &m_TaskPanel, IDC_WORKSPACE_LIST_REPORT); m_pReportViewItem = m_pReportViewGroup->AddControlItem(m_lstReportSections.GetSafeHwnd()); }
|
|
![]() |
|
kram617 ![]() Newbie ![]() Joined: 24 February 2006 Status: Offline Points: 12 |
![]() ![]() ![]() ![]() ![]() |
Looks like I found the problem. I was calling SetSize for each item in my OnSize handler, but I wasn't checking first if that particular group was expanded. So basically, I was resizing an item to nothing because the group height is zero when collapsed. Thus, the next time I would expand a group the item wouldn't appear.
Now I don't resize until I receive a XTP_TPN_GROUPEXPANDED actions from XTPWM_TASKPANEL_NOTIFY.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |