Results 1 to 6 of 6

Thread: [resolved][2005] RTBox SelectionBackColor

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2005
    Posts
    127

    [resolved][2005] RTBox SelectionBackColor

    I have a piece of text selected using RTBox.select(startNum, Length). Then I set RTbox.selectionbackcolor to yellow and nothing happens. Is there something else I need to do?
    Last edited by daemonk; Mar 26th, 2007 at 08:14 PM.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] RTBox SelectionBackColor

    While the text is still selected it will show the normal selection box. If you click somewhere else in the control you should find that the background of the previously selected text is yellow.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2005
    Posts
    127

    Re: [2005] RTBox SelectionBackColor

    when I deselect the selection by just clicking somewhere else. The background color of the previous selection remains the same color. Maybe I have to make it permanent somehow? Since there is no more selection when I deselect, there is nothing for selectionbackcolor to color?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] RTBox SelectionBackColor

    Have you debugged? Have you checked what values the startNum and Length variables contain when you run it? Also, post your code so we don't have to guess what exactly you're doing. We shouldn't have to ask for that.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Apr 2005
    Posts
    127

    Re: [2005] RTBox SelectionBackColor

    pretty much when the button is clicked:

    Code:
                    RTSequenceText.Select(StartNum, LengthNum)
                    RTSequenceText.SelectionBackColor = drawing.color.yellow
    RTSequenceText is the name of the RTBox. The first select line is probably working because I do see the correct selection highlighted.

    EDIT-
    Hmm okay when I try this:

    Code:
    RTSequenceText.find("TEST")
    RTSequenceText.SelectionBackColor = drawing.color.yellow
    it works and sets backcolor of every instance of TEST to yellow.

    EDIT2-

    okay I tried this:

    Code:
    RTSequenceText.Select(StartNum, LengthNum)
    RTSequenceText.find(RTSequenceText.selectedText)
    RTSequenceText.SelectionBackColor = drawing.color.yellow
    still doesn't work.
    Last edited by daemonk; Mar 26th, 2007 at 07:49 PM.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Apr 2005
    Posts
    127

    Re: [2005] RTBox SelectionBackColor

    bah nvm. figured it out.

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