Results 1 to 2 of 2

Thread: RichText . SelColor

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Location
    Omaha, NE, USA
    Posts
    28
    In a program I am currently working on, the user types input into a textbox and hits enter. When they do so, the text is put into a rich text box. Immediately after, a result to their input is also added to the rich text box. The trouble is, I *.SelColor to change the input to gray, then *.SelColor back to white for the result. However, the result is printed in gray as well.
    If the text ""Hello." is put into the textbox and the user hits enter, ">"Hello" will be added in gray to the rich text box. In turn, the program will change the rich text box color to white and reference the Say Text sub which prints the result, "You say, "Hello"". I have tried moving the line that returns the *.SelColor to white in the sub, but it still doesn't work.
    I would appreciate any help you can give, even if it's just a guess. Thanks!

    If KeyAscii = 13 Then
    KeyAscii = 0
    Display.SelColor = &H8000000F
    Display.Text = Display.Text + vbNewLine + "> " + Input_Text.Text
    Display.SelColor = vbWhite
    If Input_Function = "Say" Then
    Call SayText
    ElseIf Input_Function = "Yell" Then
    Call YellText
    ElseIf Input_Function = "Whisper" Then
    Call WhisperText
    End If
    Input_Text.Text = ""
    Display.Text = Display.Text + vbNewLine
    End If
    End Sub

    Public Sub SayText()
    Display.Text = Display.Text + vbNewLine + "You say, " + Input_Text.Text + """"
    End Sub
    - Ovid -

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Location
    Omaha, NE, USA
    Posts
    28
    ______Nevermind! I suppose if you try long enough you figur eout all your problems yourself, huh. Thanks anyways if you were going to reply.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width