StrataFrame Forum

InfoBox + MessageItem

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

By Bastian Töpfer - 4/15/2007

Hi,



I want to use a InfoBox to display a MessageItem. The overloaded methode ErrorBox does not take

a MessageKey.



Thanks
By Trent L. Taylor - 4/16/2007

Bastian,

The InfoBox and ErrorBox do not accept a message key.  Instead, you can pull from the localization database using the RetrieveTextValue method and pass that value to the ErrorBox.

Imports MicroFour.StrataFrame.Messaging
Imports MicroFour.StrataFrame.UI

InfoBox.ErrorBox(Localization.RetrieveTextValue("MyKey"))
By Bastian Töpfer - 4/16/2007

Jep, i guess i can do that. The only thing i need to know for that is how to "translate" the

rtf string of the prop "Title" into a normal string. Could you give me a hint on how to do that? Thanks

By StrataFrame Team - 4/17/2007

The best way to translate an RTF string is to create a RichTextBox control, set the Rtf property, and then get the value of the Text property from the control.  The Text property will return the string without all of the formatting.
By Bastian Töpfer - 4/17/2007

thanks a lot