Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bug in GetToolTipTest

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
floele



Joined: 04 Aug 2008
Posts: 22

PostPosted: Fri Oct 08, 2010 2:18 pm    Post subject: Bug in GetToolTipTest Reply with quote

Hi,

GetToolTipText() always does the following:

result = String.Format(ToolTip, Value)

This is prone to errors. For example, if you set the tooltip to "Sehr geehrt{-er/-e} ..." expecting to only see plaintext as tooltip, a FormatException occurs because of the braces in the text.

Conclusion: The ToolTip property should not use Format() by default.

Code:

        public virtual string GetToolTipText()
        {
            string result = null;
            if (ToolTip == null)
                result = GetText();
            else
                result = String.Format(ToolTip, Value);
            return result;
        }
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Oct 08, 2010 10:37 pm    Post subject: Reply with quote

If you want to display literal "{" and "}" values then you can escape them by repeating them eg "Sehr geehrt{{-er/-e}} ...".

We will take a look at this issue for next release.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group