When I create a WPRichText object in code, and then assign it using WPRichText1.AsString := some rtf string, WPRichText1.SelectAll does not select anything because RTFData is nil in SetSelPosLen. However, if I use WPRichText.LoadFromString(some rtf string), then SelectAll works fine and RTFData is not nil.
Using the .AsString assignment usually works fine for any WPRichText I have created at design time and load at runtime, so I was confused to what was wrong when creating one in code at runtime.
What is the difference and what is the preferred method to load a WPRichText in any case, code created or design created?
Eric