Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > MarkupLabel Control
  New Posts New Posts RSS Feed - CXTPMarkupListBox rendered wrong
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPMarkupListBox rendered wrong

 Post Reply Post Reply
Author
Message
vjedlicka View Drop Down
Senior Member
Senior Member


Joined: 04 September 2007
Status: Offline
Points: 122
Post Options Post Options   Thanks (0) Thanks(0)   Quote vjedlicka Quote  Post ReplyReply Direct Link To This Post Topic: CXTPMarkupListBox rendered wrong
    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
Back to Top
vjedlicka View Drop Down
Senior Member
Senior Member


Joined: 04 September 2007
Status: Offline
Points: 122
Post Options Post Options   Thanks (0) Thanks(0)   Quote vjedlicka Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.