Print Page | Close Window

CXTPMarkupListBox rendered wrong

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: MarkupLabel Control
Forum Description: Topics Related to Codejock MarkupLabel Control
URL: http://forum.codejock.com/forum_posts.asp?TID=23730
Printed Date: 20 April 2024 at 3:25am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPMarkupListBox rendered wrong
Posted By: vjedlicka
Subject: CXTPMarkupListBox rendered wrong
Date Posted: 27 September 2018 at 4:58am
I am trying to replace a normal CListBox with a CXTPMarkupListBox

I changed the declaration in .h file to 

CXTPMarkupListBox m_ctrl_formats;

Then I fill the listbox using this code:

CString ls_test = _T("<TextBlock Padding='2, 0, 2, 0'><Bold>Hi</Bold> <Run Foreground='Green'>there</Run></TextBlock>");
XTP_MARKUP_LISTITEM* pItem = new XTP_MARKUP_LISTITEM(&m_ctrl_formats);
pItem->Resolve(ls_test);
int li_index = m_ctrl_formats.AddString((LPCTSTR)pItem);


Here is the result:




-------------
Thank you
Vaclav
---------------------
ToolkitPro 20.1.0
VS2010-2022, Windows 11



Replies:
Posted By: vjedlicka
Date Posted: 28 September 2018 at 2:27am
Problem fixed by setting the "owner draw" property to "variable"

-------------
Thank you
Vaclav
---------------------
ToolkitPro 20.1.0
VS2010-2022, Windows 11



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