![]() |
TaskPanel: how to add separator in the group items |
Post Reply
|
| Author | |
debugx
Groupie
Joined: 23 June 2008 Location: Andorra Status: Offline Points: 28 |
Post Options
Thanks(0)
Quote Reply
Topic: TaskPanel: how to add separator in the group itemsPosted: 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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 July 2008 at 12:06pm |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 July 2008 at 3:11am |
|
this is great. thanks
|
|
|
"Один законник с портфелем в рукаm
|
|
![]() |
|
debugx
Groupie
Joined: 23 June 2008 Location: Andorra Status: Offline Points: 28 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 October 2008 at 10:09am |
|
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 October 2008 at 1:35am |
|
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 |