Print Page | Close Window

Markup & error

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=17397
Printed Date: 20 June 2025 at 7:48am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Markup & error
Posted By: znakeeye
Subject: Markup & error
Date Posted: 08 October 2010 at 5:33am
XTP 13.4.1. Using CMarkupStatic. Consider this:
 
m_static.EnableMarkup();
// m_static.SetWindowText("<TextBlock>&Close</TextBlock>"); <-- yields xml error...
m_static.SetWindowText("<TextBlock>&amp;Close</TextBlock>"); // xml ok :)
 
That sets the text to "&Close". ALT+C works, but the ampersand should not be there! For a static control you need "&&Close" to make ampersand visible!
 
Any ideas?


-------------
PokerMemento - http://www.pokermemento.com/



Replies:
Posted By: Oleg
Date Posted: 08 October 2010 at 6:58am
Hi,

How markup have to determine that you use it in static and don't want show "&" ? :-)

Try this
<TextBlock><Underline>C</Underline>lose</TextBlock>


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: znakeeye
Date Posted: 08 October 2010 at 9:55am
Underline is a good thing! :) But will ALT+C work here?

-------------
PokerMemento - http://www.pokermemento.com/


Posted By: Oleg
Date Posted: 08 October 2010 at 1:11pm
Hi,

You can always call CWnd::SetWindowText("&Close") to notidy system that you want Alt+C but use Markup text to draw it.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: znakeeye
Date Posted: 08 October 2010 at 1:59pm
Thanks. Will give it a shot!

-------------
PokerMemento - http://www.pokermemento.com/



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