[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference abbott::visual_basic

Title:Microsoft Visual Basic
Moderator:TAMARA::DFEDOR::fedor
Created:Thu May 02 1991
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2565
Total number of notes:10453

2502.0. "adding Text to Richtext Control" by JULIET::LEE_CA () Thu Feb 20 1997 14:48

    Excuse my Ignorance on the matter, But I'm looking for a way to stuff
    Text into a RichText Control.  .Text seems to be  for reading only.
    
    RichText1.Text(0)="test" doesn't appear to work
    
    		Help is appreciated
    
    			Carey Lee
T.RTitleUserPersonal
Name
DateLines
2502.1Looks like your syntax to me ...FUTURS::MARSHALL1Fri Feb 21 1997 09:0524
    
    Hi,
    
    	I have just had a quick look at this and it looks as though you
    	have your syntax wrong. I had this work by:
    
    		RichText1.Text = "Test1"
    
    	If I wanted to insert two lines then:
    
    		RichText1.Text = "Test1" & vbCrLf & "Test2"
    
    	If I wanted to append to what was already there:
    
    		RichTextBox1.SelStart = Len(RichTextBox1)
    		RichTextBox1.SelLength = 0
    		RichTextBox1.SelText = vbCrLf & "New Text Line"
    
    
    Hope this helps you do what you want ...
    
    
    		Steve