Results 1 to 11 of 11

Thread: Rich Text Box [RESOLVED]

  1. #1

    Thread Starter
    Fanatic Member Nove's Avatar
    Join Date
    Jul 2004
    Posts
    736

    Resolved Rich Text Box [RESOLVED]

    i want to go through the contents in a rich text box letter by letter and retreive the color of each character. How?
    Last edited by Nove; Feb 12th, 2005 at 12:55 PM.

  2. #2
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: Rich Text Box

    VB Code:
    1. Dim i As Integer
    2.    
    3.     For i = 1 To Len(RTB.Text)
    4.         RTB.SelStart = i
    5.         RTB.SelLength = 1
    6.         MsgBox RTB.SelColor
    7.     Next



    Has someone helped you? Then you can Rate their helpful post.

  3. #3

    Thread Starter
    Fanatic Member Nove's Avatar
    Join Date
    Jul 2004
    Posts
    736

    Re: Rich Text Box

    thanks.

    Also, I need my rtb to have vertical and horizontal scrollbars, but when I set the scrollbars property to 3 (both) it never displays any horizontal scroll bars. What's wrong?

  4. #4
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Rich Text Box

    They will appear when the text is bigger than the textbox.

    You have done everything right!

  5. #5

    Thread Starter
    Fanatic Member Nove's Avatar
    Join Date
    Jul 2004
    Posts
    736

    Re: Rich Text Box

    Sorry, but I must not be understanding something. I type until it gets to the very right edge of the box but then it just stays there and won't upon any scroll bars. Is it because I have multiline on?

  6. #6

  7. #7
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Rich Text Box

    D'oh. I forgot that one. Is it working now?

  8. #8

    Thread Starter
    Fanatic Member Nove's Avatar
    Join Date
    Jul 2004
    Posts
    736

    Re: Rich Text Box

    sorry, that doesn't seem to solve it. While disabled scroll bars are now visible text just continues to loop rather than extending with the scroll bar.

  9. #9
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Rich Text Box

    set thr RightMargin property (in twips) to as far as you want to type before it wraps the text.

    and if you set DisableNoScroll to true, the bars wil pop up as needed.

  10. #10
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Rich Text Box

    Here is what help has to sy:

    A horizontal scrollbar will appear only when the RightMargin property is set to a value that is larger than the width of the control. (The value can also be equal to, or slightly smaller than the width of the control.)

  11. #11

    Thread Starter
    Fanatic Member Nove's Avatar
    Join Date
    Jul 2004
    Posts
    736

    Re: Rich Text Box

    that works, thanks everyone.

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