Last post Jul 20, 2007 04:22 PM by bdemarzo
Jul 20, 2007 11:52 AM|ahsteele|LINK
I hope that I have not exhuasted all of the good will on this forum with my last spouting of
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. :)
Jul 20, 2007 01:12 PM|Russ Helfand|LINK
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.
Jul 20, 2007 03:38 PM|ahsteele|LINK
I sent Brian a message on the CodePlex site. Thanks for the feedback!
Jul 20, 2007 04:22 PM|bdemarzo|LINK
The change has been added to the CodePlex site. Thanks!
Future changes can be submitted using CodePlex's "patch" feature.