Print Page | Close Window

v9.8 Task Panel icon size

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2964
Printed Date: 17 November 2024 at 1:31pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: v9.8 Task Panel icon size
Posted By: JamesH
Subject: v9.8 Task Panel icon size
Date 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 );

 




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


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

             }



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


Posted By: Oleg
Date Posted: 30 September 2005 at 2:10am

use new method from 9.80:

SetGroupIconSize(long Cx, long Cy);



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


Posted By: JamesH
Date Posted: 30 September 2005 at 11:48am
D'oh... thanks Oleg, that works great. 



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