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?
Printable View
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?
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.
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?
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.
pretty much when the button is clicked:
RTSequenceText is the name of the RTBox. The first select line is probably working because I do see the correct selection highlighted.Code:RTSequenceText.Select(StartNum, LengthNum)
RTSequenceText.SelectionBackColor = drawing.color.yellow
EDIT-
Hmm okay when I try this:
it works and sets backcolor of every instance of TEST to yellow.Code:RTSequenceText.find("TEST")
RTSequenceText.SelectionBackColor = drawing.color.yellow
EDIT2-
okay I tried this:
still doesn't work.Code:RTSequenceText.Select(StartNum, LengthNum)
RTSequenceText.find(RTSequenceText.selectedText)
RTSequenceText.SelectionBackColor = drawing.color.yellow
bah nvm. figured it out.