Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Bolding Task Panel Iems
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bolding Task Panel Iems

 Post Reply Post Reply
Author
Message
DougW View Drop Down
Newbie
Newbie
Avatar

Joined: 03 March 2004
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote DougW Quote  Post ReplyReply Direct Link To This Post Topic: Bolding Task Panel Iems
    Posted: 03 March 2004 at 1:49pm

I created an application that uses the CXTPTaskPanel.  I studied the example from  ...\ToolkitPro\samples\ToolkitPro\TaskPanel

My goal is to have Task Panel items turn bold when the user clicks them, so I handle the

XTPWM_TASKPANEL_NOTIFY message and I unbold any previous selection and them bold the new selection.  This technique seems to work fine....well, almost!

It appears that the size of the text is insufficient.  Most of my Task Panel items have labels that are 2 or 3 words long.  When an item is bolded the last word is chopped off.  I noticed that if I define the item text (in the resources) as having a few spaced padded to the end the bolding works.  This suggests that the GroupItem class is not properly resizing the text area for bolded items.

Any ideas how to handle this?  Oh, I don't want to add the padded spaces since that causes the hot link text the show underlined spaces.

BTW: I'm using Windows 2000; Xtreme Toolkit Pro 8.61

 

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: 04 March 2004 at 12:44pm
Try to call m_wnTaskPanel.Reposition() after SetBold();
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
DougW View Drop Down
Newbie
Newbie
Avatar

Joined: 03 March 2004
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote DougW Quote  Post ReplyReply Direct Link To This Post Posted: 04 March 2004 at 3:56pm

  No go.  I added the call to Reposition() but it still behaves the same. 

BTW: I streched out the width of my Task Panel window so that the width is not an issue.

I am changing views based on what Task Panel item is clicked.  When I do I am unbolding the previous selection and bolding the new selection.  The new selection shows up in bold but the last wordis cut off (not partially...the whole word is gone).

If I hover over the bolded item the underline (hot) text shows me the full label.

Back to Top
DougW View Drop Down
Newbie
Newbie
Avatar

Joined: 03 March 2004
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote DougW Quote  Post ReplyReply Direct Link To This Post Posted: 04 March 2004 at 4:12pm

By the way, as a test I modified the TaskPanel sample and I get the same problem.  The sample project is located at samples\ToolkitPro\TaskPanel.

Here's my modifications:

In the MainFrm.h file add a member variable to the CMainFrame class as follows:

CXTPTaskPanelGroupItem* m_pPreviousTaskPanelItem;

Now in the MainFrm.cpp file you need to initialize the member variable in the class constructor.

CMainFrame::CMainFrame()

{

m_pPreviousTaskPanelItem = NULL;

...

 

Finally, in the Task Panel's notification handler, change the click case to look like the following:

LRESULT CMainFrame::OnTaskPanelNotify(WPARAM wParam, LPARAM lParam)

{

   switch(wParam)

   {

      case XTP_TPN_CLICK:

      {

         if (m_pPreviousTaskPanelItem)

         {

             m_pPreviousTaskPanelItem->SetBold(FALSE);

         }

         m_pPreviousTaskPanelItem = (CXTPTaskPanelGroupItem*)lParam;

         m_pPreviousTaskPanelItem->SetBold(TRUE);

         m_wndTaskPanel.Reposition();

      }

...

 

Notice that all I do is unbold the previous and bold the current selection.  When you run it make the task panel plenty wide so that width is not an issue.  Click an item; now click another one.  I am seeing the last word dropped.

 

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: 05 March 2004 at 1:59am
Ok, agree. I sended fix to email.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
DougW View Drop Down
Newbie
Newbie
Avatar

Joined: 03 March 2004
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote DougW Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2004 at 9:58am

  Yeah!!!  It works!  Thanks Oleg!

 

Back to Top
studioars View Drop Down
Newbie
Newbie


Joined: 17 March 2004
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote studioars Quote  Post ReplyReply Direct Link To This Post Posted: 17 March 2004 at 3:34am

Please, can you send me that fix besause I have the same problem

Thanks

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 March 2004 at 9:09am
We must release next version within 3 weeks. Please  wait a little.
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.125 seconds.