Print Page | Close Window

How to set Dynamic Icon in Tabs ?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=16691
Printed Date: 07 May 2024 at 6:08am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to set Dynamic Icon in Tabs ?
Posted By: shanmuganathan
Subject: How to set Dynamic Icon in Tabs ?
Date Posted: 11 May 2010 at 1:36am
Hi Friends,

I am implementing TabControl for my SDI application. I need to know how to do the following item using CXTPTabControl.

1) I need to set icons in my TabControl dynamically. Meaning if i open google or codejock webpage i need to get its corresponding icons in tab?

I tried using this member function called ShowIcons provided by CXTPTabControl. But of no use.

I am using Xtreme ToolkitPro v12.1.1 version. And my IDE is VS2008.




Replies:
Posted By: mgampi
Date Posted: 11 May 2010 at 2:44am
Hi;

Try CXTPTabManagerItem::SetImageIndex() instead.


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: shanmuganathan
Date Posted: 11 May 2010 at 6:54am
Hi,

It would be great if you could provide me a sample. I tried to doing the following but i am not getting the icons in tab.

CXTPImageManager* pImageManager = NULL;
CSize size;
size.SetSize( 8, 8 );
pImageManager->SetIconFromIcoFile( "Sample.ico", 1, size, xtpImageNormal );


Posted By: mgampi
Date Posted: 11 May 2010 at 7:01am
Hi;

You have to dynamically add icons to a CImageList object and then assign this CImageList to the tab control.
Then use SetImageIndex to assign the icons.


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017



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