Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - TaskPanel: how to add separator in the group items
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TaskPanel: how to add separator in the group items

 Post Reply Post Reply
Author
Message
debugx View Drop Down
Groupie
Groupie
Avatar

Joined: 23 June 2008
Location: Andorra
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote debugx Quote  Post ReplyReply Direct Link To This Post Topic: TaskPanel: how to add separator in the group items
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
debugx View Drop Down
Groupie
Groupie
Avatar

Joined: 23 June 2008
Location: Andorra
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote debugx Quote  Post ReplyReply Direct Link To This Post Posted: 18 July 2008 at 3:11am
this is great. thanks
"Один законник с портфелем в рукаm
Back to Top
debugx View Drop Down
Groupie
Groupie
Avatar

Joined: 23 June 2008
Location: Andorra
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote debugx Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 03 October 2008 at 1:35am
Hi,
 
TaskPanel will free it automatically.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.