Print Page | Close Window

TaskPanel: how to add separator in the group items

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=11478
Printed Date: 23 June 2025 at 10:56pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: TaskPanel: how to add separator in the group items
Posted By: debugx
Subject: TaskPanel: how to add separator in the group items
Date 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



Replies:
Posted By: Oleg
Date 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


Posted By: debugx
Date Posted: 18 July 2008 at 3:11am
this is great. thanks

-------------
"Один законник с портфелем в рукаm


Posted By: debugx
Date 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


Posted By: Oleg
Date Posted: 03 October 2008 at 1:35am
Hi,
 
TaskPanel will free it automatically.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net