How to set Dynamic Icon in Tabs ? |
Post Reply |
Author | |
shanmuganathan
Groupie Joined: 01 December 2006 Status: Offline Points: 49 |
Post Options
Thanks(0)
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. |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
Hi;
Try CXTPTabManagerItem::SetImageIndex() instead. |
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
shanmuganathan
Groupie Joined: 01 December 2006 Status: Offline Points: 49 |
Post Options
Thanks(0)
|
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 ); |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
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 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |