Data Access Worldwide Knowledge Base

Article ID 2189
Article Title HOWTO: Have content displayed in RichEdit control when View Loads
Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2189
KBase Category VDF11
Date Created 11/07/2005
Last Edit Date 11/09/2005


Article Text
QUESTION:
I created a RichEdit object in my view and would like to display some formatted text in it as soon as the view is loaded. I know I could use "set value" if I was adding just plain text, but what can I use in order to show the formatted text? I tried augmenting the procedure "Activate" but no text was displayed...

ANSWER:
You will need to augment the Page procedure. In the example below, we add some text in Bold to the control:

Procedure Page Boolean bPageObject

    Forward Send Page bPageObject

    If (bPageObject) Begin
        Send delete_data

        Send AppendText "This is an example. "

        Set pbBold to True
        Send AppendTextLn "You should add this to the Page procedure. "
        Set pbBold to False
        Send AppendTextLn ""
        Send AppendTextLn "When you start your view, this text will be displayed."

    End

End_Procedure  // Page



Contributed By:
Marcia Booth
Company: Data Access Worldwide
Web Site: http://www.dataaccess.com

Web Links Related to this Article
DAW Knowledge Base article 2112: HOWTO: Set the color for a text selection in a RichEdit control
URL=http://www.dataaccess.com/KBPrint.asp?ArticleID=2112

DAW Knowledge Base article 2148: HOWTO: Create tables in a cRichEdit object
URL=http://www.dataaccess.com/KBPrint.asp?ArticleID=2148


Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.

The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.