On Sep 30, 2005, at 6:29 PM, David Glass wrote:
In an effort to properly display ampersands in StaticText captions I
was wondering if it would be possible to subclass the StaticText
control to handle the caption manipulation.
Would this be an effective way of handling the issue, or am I better
off with a bunch of 'replaceall(text, "&", "&&")' commands?
Ideally, a subclass is workable as I would like to then subclass
popupmenus as well.
Any guidance on how to accomplish this would be appreciated.
Instead of subclassing, use Extends and a global method to add a method
to StaticText.
Sub SetEscapedText(Extends s as StaticText, theText as String)
s.Text = ReplaceAll(theText, "&", "&&")
End Sub
--------------
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|