locked
TreeView ImageTooltip RRS feed

  • Question

  • User-1467029032 posted

    I hope that I have not exhuasted all of the good will on this forum with my last spouting of idiocy.

    I am suprise, suprise still working on a TreeView.  I was just wondering why in the TreeViewAdapter class the WriteNodeImage method did not use the ImageToolTip property for setting the alt text for the image.  Setting the the ToolTip property for the TreeNode will cause the appropriate alt text to be rendered, but it seems that the ImageToolTip property would be the more appropriate.  Suggestion below:

    // present code:
    writer.WriteAttribute("alt", !String.IsNullOrEmpty(item.ToolTip) ? item.ToolTip : (!String.IsNullOrEmpty(treeView.ToolTip) ? treeView.ToolTip : item.Text));
    
    // possible change:
    writer.WriteAttribute("alt", !String.IsNullOrEmpty(item.ImageToolTip) ? item.ImageToolTip : !String.IsNullOrEmpty(item.ToolTip) ? item.ToolTip : (!String.IsNullOrEmpty(treeView.ToolTip) ? treeView.ToolTip : item.Text));
    

    Thoughts?  I could still be a moron. :)

    Friday, July 20, 2007 11:52 AM

Answers

  • User-534056067 posted

    I haven't encountered any morons or moronic questions/comments on this forum. Certainly you are no dummy or moron. Your idea (above) is excellent. It has a very nice fallback of using the ToolTip if the author hasn't set the ImageToolTip.

    Why wasn't this done originally? Because I didn't think of it. I'm glad that you did!

    All enhancements at this point being added via the CodePlex community-driven project at http://www.codeplex.com/cssfriendly. Are you interested in joining that effort? If so, I think the right procedure is to go to the CodePlex site, sign up for an account (if you don't already have one), and submit a request to be added as a dev to the team. Or... you can contact Brian via http://www.codeplex.com/UserAccount/UserProfile.aspx?UserName=bdemarzo. Sometimes he likes to work one-on-one with prospective contributors for their first few contributions before turning them loose on the code in a freer fashion.

    Thanks for helping. Even if you choose not to add this to the CodePlex source code I'm sure that this posting will eventually be found by authors like you who wanted this behavior... and your posted solution should be quite helpful to them.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 20, 2007 1:12 PM

All replies

  • User-534056067 posted

    I haven't encountered any morons or moronic questions/comments on this forum. Certainly you are no dummy or moron. Your idea (above) is excellent. It has a very nice fallback of using the ToolTip if the author hasn't set the ImageToolTip.

    Why wasn't this done originally? Because I didn't think of it. I'm glad that you did!

    All enhancements at this point being added via the CodePlex community-driven project at http://www.codeplex.com/cssfriendly. Are you interested in joining that effort? If so, I think the right procedure is to go to the CodePlex site, sign up for an account (if you don't already have one), and submit a request to be added as a dev to the team. Or... you can contact Brian via http://www.codeplex.com/UserAccount/UserProfile.aspx?UserName=bdemarzo. Sometimes he likes to work one-on-one with prospective contributors for their first few contributions before turning them loose on the code in a freer fashion.

    Thanks for helping. Even if you choose not to add this to the CodePlex source code I'm sure that this posting will eventually be found by authors like you who wanted this behavior... and your posted solution should be quite helpful to them.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 20, 2007 1:12 PM
  • User-1467029032 posted

    I sent Brian a message on the CodePlex site.  Thanks for the feedback! 

    Friday, July 20, 2007 3:38 PM
  • User-1385398420 posted

    The change has been added to the CodePlex site. Thanks!

    Future changes can be submitted using CodePlex's "patch" feature.

     

    Friday, July 20, 2007 4:22 PM