![]() |
TaskPanel: how to add separator in the group items |
Post Reply ![]() |
Author | |
debugx ![]() Groupie ![]() ![]() Joined: 23 June 2008 Location: Andorra Status: Offline Points: 28 |
![]() ![]() ![]() ![]() ![]() Posted: 17 July 2008 at 10:48am |
Hello All,
I use SDI application and TaskPanel control. I want to get separator after the one title text item in my group list. How can I add separator in the group items list? Now I simply add text item with AddTextItem function and then load string "___________" But it does not look like good. Maybe there is some better way how to add separator into the task panel group items list? Thanks. |
|
"Один законник с портфелем в рукаm
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
just create item class:
class CTaskPanelSeparatorItem : public CXTPTaskPanelGroupItem { public: CTaskPanelSeparatorItem() { }
~CTaskPanelSeparatorItem() { } CRect OnReposition(CRect rc)
{ m_rcItem = rc; m_rcItem.bottom = m_rcItem.top + 2; return m_rcItem;
} void OnDrawItem(CDC* pDC, CRect rc) { pDC->FillSolidRect(rc, 0xFF0000); } HICON m_hIcon;
};
usage
pGroupDetails->GetItems()->Add(new CTaskPanelSeparatorItem(), 0);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
debugx ![]() Groupie ![]() ![]() Joined: 23 June 2008 Location: Andorra Status: Offline Points: 28 |
![]() ![]() ![]() ![]() ![]() |
this is great. thanks
|
|
"Один законник с портфелем в рукаm
|
|
![]() |
|
debugx ![]() Groupie ![]() ![]() Joined: 23 June 2008 Location: Andorra Status: Offline Points: 28 |
![]() ![]() ![]() ![]() ![]() |
sorry, one question.
Should I anyhow free a memory of CTaskPanelSeparatorItem class object after following using: pGroupDetails->GetItems()->Add(new CTaskPanelSeparatorItem(), 0); thanks in advance. |
|
"Один законник с портфелем в рукаm
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
TaskPanel will free it automatically.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
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 |