Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - v9.8 Task Panel icon size
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

v9.8 Task Panel icon size

 Post Reply Post Reply
Author
Message
JamesH View Drop Down
Senior Member
Senior Member


Joined: 01 December 2004
Status: Offline
Points: 149
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesH Quote  Post ReplyReply Direct Link To This Post Topic: v9.8 Task Panel icon size
    Posted: 28 September 2005 at 5:45pm

I've added a number of group bitmaps to a task panel but the SetIconSize call doesn't seem to have any affect.  Does it work for anyone else?

The code looks something like:

 CImageList il;
 AfxSetResourceHandle( notifier->inst() );
 il.Create(IDB_VISIBILITY_BITMAPS, 16, 1, RGB(0, 0xFF, 0));
 for (int i = 0; i < 10; i++)
 {
  HICON hIcon = il.ExtractIcon(i);
  if (hIcon)
  {
   spTaskPanel->Icons->AddIcon( (long)hIcon, i, XtremeTaskPanel::xtpImageNormal );
  }
 }

 int iconSize = gPref->GetPreference("TaskPanelIconSize", 8, "TaskPanel" );
 spTaskPanel->SetIconSize( iconSize, iconSize );

 

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: 28 September 2005 at 11:13pm

Hi,

In toolbox sample I added

wndToolBox.SetIconSize 8, 8

and it works... What picture do you see?

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JamesH View Drop Down
Senior Member
Senior Member


Joined: 01 December 2004
Status: Offline
Points: 149
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesH Quote  Post ReplyReply Direct Link To This Post Posted: 29 September 2005 at 1:03pm

Unfortunately we're using WTL but there isn't a task panel sample, so I dug up a copy of c# and modified the task panel sample (see the end of this message) but the group icon size doesn't change.  In my original message I was using SetIconSize on the task panel object (which I thought was how it would be done) but it seems there is also a SetIconSize on the group object, neither of these seem to change the size of the group icons.  The item icons change but not the group. Any ideas?

void CreateTaskPanel()

             {

                  

                   TaskPanelGroup Group = wndTaskPanel.Groups.Add(0, "System Tasks");

                   Group.Tooltip = "These tasks apply to your computer";

                   Group.Special = true;

   

                   Group.Items.Add(ID_TASKITEM_HIDECONTENTS, "Hide the contents of this drive", XTPTaskPanelItemType.xtpTaskItemTypeLink, 1);

                   Group.Items.Add(ID_TASKITEM_ADDORREMOVE, "Add or remove programs", XTPTaskPanelItemType.xtpTaskItemTypeLink, 2);

                   Group.Items.Add(ID_TASKITEM_SEARCH, "Search for files and folders", XTPTaskPanelItemType.xtpTaskItemTypeLink, 3);

   

                   Group = wndTaskPanel.Groups.Add(0, "File and Folders Tasks");

                   Group.Tooltip = "These tasks apply to the files and folders you select";

   

                   Group.Items.Add(ID_TASKITEM_NEWFOLDER, "Make a new folder", XTPTaskPanelItemType.xtpTaskItemTypeLink, 4);

                   Group.Items.Add(ID_TASKITEM_PUBLISH, "Publish this folder to the Web", XTPTaskPanelItemType.xtpTaskItemTypeLink, 5);

                   Group.Items.Add(ID_TASKITEM_SHARE, "Share this folder", XTPTaskPanelItemType.xtpTaskItemTypeLink, 6);

   

                   Group = wndTaskPanel.Groups.Add(0, "Other Places");

                   TaskPanelGroupItem Item = Group.Items.Add(ID_TASKITEM_MYCOMPUTER, "My Computer", XTPTaskPanelItemType.xtpTaskItemTypeLink, 7);

                   Item.Tooltip = "Shows the disk drives and hardware connected this computer";

   

                   Item = Group.Items.Add(ID_TASKITEM_MYDOCUMENTS, "My Documents", XTPTaskPanelItemType.xtpTaskItemTypeLink, 8);

                   Item.Tooltip = "Shows this computer documents";

   

                   Group.Items.Add(ID_TASKITEM_SHAREDDOCUMENTS, "Shared Documents", XTPTaskPanelItemType.xtpTaskItemTypeLink, 9);

                   Group.Items.Add(ID_TASKITEM_MYNETWORKPLACES, "My Network Places", XTPTaskPanelItemType.xtpTaskItemTypeLink, 10);

   

                   Group = wndTaskPanel.Groups.Add(0, "Details");

                   wndTaskPanel.SetIconSize(8,8);

 

                   Item = Group.Items.Add(0, "Local Disk (C:)", XTPTaskPanelItemType.xtpTaskItemTypeText, -1);

                   Item.Bold = true;

                   Item.SetMargins(0, 0, 0, 0);

   

                   Group.Items.Add(0, "Local Disk", XTPTaskPanelItemType.xtpTaskItemTypeText, -1);

                   Group.Items.Add(0, "File System: FAT32", XTPTaskPanelItemType.xtpTaskItemTypeText, -1);

                   Group.Items.Add(0, "Free Space: 23,3 GB", XTPTaskPanelItemType.xtpTaskItemTypeText, -1);

                   Group.Items.Add(0, "FTotal Size: 76,2 GB", XTPTaskPanelItemType.xtpTaskItemTypeText, -1);

    

                   Group.IconIndex=1;

Group.SetIconSize( 8, 8 );

 

                   wndTaskPanel.Icons = (XtremeTaskPanel.ImageManagerIcons)TaskPanelIcons.Icons;

                   wndTaskPanel.Reposition();

                   wndTaskPanel.AllowDrag = XtremeTaskPanel.XTPTaskPanelItemAllowDrag.xtpTaskItemAllowDrag;

             }

Back to Top
gshawn View Drop Down
Senior Member
Senior Member


Joined: 04 October 2004
Status: Offline
Points: 227
Post Options Post Options   Thanks (0) Thanks(0)   Quote gshawn Quote  Post ReplyReply Direct Link To This Post Posted: 29 September 2005 at 1:38pm
I saw the same problem when using v9.8 TaskPanel in VB6 SP6. I could not figure it out, it seems the method has no effect.
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: 30 September 2005 at 2:10am

use new method from 9.80:

SetGroupIconSize(long Cx, long Cy);

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JamesH View Drop Down
Senior Member
Senior Member


Joined: 01 December 2004
Status: Offline
Points: 149
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesH Quote  Post ReplyReply Direct Link To This Post Posted: 30 September 2005 at 11:48am
D'oh... thanks Oleg, that works great. 
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.156 seconds.