![]() |
CXTPGridControl Is not supported SVG? |
Post Reply ![]() |
Author | |
hiro-ta ![]() Groupie ![]() Joined: 11 July 2013 Status: Offline Points: 69 |
![]() ![]() ![]() ![]() ![]() Posted: 16 June 2025 at 11:24pm |
I want to use an SVG icon for a record in
When using a BMP image as shown below, the icon was displayed correctly.
|
|
![]() |
|
agontarenko ![]() Moderator Group ![]() Joined: 25 March 2016 Status: Offline Points: 326 |
![]() ![]() ![]() ![]() ![]() |
Hello,
I've replace "\ToolkitPro\Samples\GridControl\GridSample\GridSampleView.cpp" function as below and XAML/SVG icons has been loaded void CGridSampleView::UpdateGridIcons() { CXTPGridControl* pWndGrid = &GetGridCtrl(); ASSERT_VALID(pWndGrid); if (!pWndGrid) return; pWndGrid->GetImageManager()->RemoveAll(); int nWidth = 0; CString type = _T("RT_SVG"); CXTPImageManager* imgMgr = pWndGrid->GetImageManager(); nWidth = XTP_DPI_X(16); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_SMALL_DOCUMENT, 0, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_SMALL_EXCLAMATION_BLUE, 1, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_SMALL_BOOKMARK, 2, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_SMALL_MAIL, 3, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_SMALL_MAIL_OPEN, 4, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_SMALL_MAIL_ARROW_LEFT, 5, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_SMALL_EXCLAMATION_RED, 6, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_SMALL_PIN_BLUE, 7, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_SMALL_PIN_RED, 8, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_SMALL_BUTTON_ARROW_DOWN, 9, nWidth); nWidth = XTP_DPI_X(32); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_LARGE_DOCUMENT, 0, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_LARGE_EXCLAMATION_BLUE, 1, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_LARGE_BOOKMARK, 2, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_LARGE_MAIL, 3, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_LARGE_MAIL_OPEN, 4, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_LARGE_MAIL_ARROW_LEFT, 5, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_LARGE_EXCLAMATION_RED, 6, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_LARGE_PIN_BLUE, 7, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_LARGE_PIN_RED, 8, nWidth); imgMgr->SetVectorIcon(type, IDR_SVG_GRID_LARGE_BUTTON_ARROW_DOWN, 9, nWidth); } Artem Gontarenko |
|
![]() |
|
agontarenko ![]() Moderator Group ![]() Joined: 25 March 2016 Status: Offline Points: 326 |
![]() ![]() ![]() ![]() ![]() |
![]() |
|
![]() |
|
agontarenko ![]() Moderator Group ![]() Joined: 25 March 2016 Status: Offline Points: 326 |
![]() ![]() ![]() ![]() ![]() |
Hello,
I'm glad to inform you that the issue has been addressed and fixed. The fix will be available in the next beta or final release. Once you have an update installed, please make sure everything works as expected, let me know if there are any issues left. Regards, Artem Gontarenko |
|
![]() |
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 |