StrataFrame Forum

"&"-Symbol not showing in Strataframe Labels

http://forum.strataframe.net/Topic22350.aspx

By Philipp Guntermann - 3/12/2009

Hi,

i have an issue with SF Labels. They are not showing the "&"-sign. if the fieldvalue is for example: "Müller & Bauer", it shows "Müller Bauer".

i had this issue before with textfields, but that is fixed now. i believe in last update it was changed.

Thanks.

By Trent L. Taylor - 3/13/2009

This has nothing to do with SF, if you use a standard label you will have the same issue.  In a label, the "&" is a tag to set the next character as a hotkey or underline.  Same as in a menu.  If you want to show an &, then you have to escape the first character with another &.  Just do this:

MyName && SecondPart
By Philipp Guntermann - 3/13/2009

hi trent,

thanks for the info. can u suggest a method to automate replacing one & with double &'s with labels bound to business object field ?

By Trent L. Taylor - 3/13/2009

It depends on how you are binding to it.  You could create a shared (static) class and then create a custom property to which you bind.  That is just one idea.
By Philipp Guntermann - 3/13/2009

i am binding it through the binding field property in the property editor.

i thought about maybe subclassing the strataframe label component and override some Event. Not at work right now, so not sure if it even has a TextChanged-Event or something like that. Gonna take a look at this on monday.

By Trent L. Taylor - 3/14/2009

There is, but you would want to override the Text propety versus handling the event.
By Philipp Guntermann - 3/16/2009

thanks, works well.