By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,824 Members | 2,410 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,824 IT Pros & Developers. It's quick & easy.

RichTextBox Colors

P: 8
When I append data to my richtextbox I use selectioncolor to set the color of that block of text. The problem with this, is if the user is selecting as well.


If my sub is called, the following executes:

with myrichtextbox
.selectioncolor = mycolor
.appendtext(mytext)
end with


So you see the problem is if the sub is called while the user is also selecting text, mycolor is applied to the user's selected text instead of mytext. Any suggestions?
Sep 22 '07 #1
Share this Question
Share on Google+
2 Replies


QVeen72
Expert 100+
P: 1,445
Hi,

Keep FormLevel Variables For the Selection which u do from Code. Pass the variables to the Procedure, and In Procedure, Remove any Previously Selcted Text and Again Re-Select That Part of Text (Passed thru parameter) and Apply Colors.

REgards
Veena
Sep 22 '07 #2

P: 8
Thanks, you were very helpful in solving this problem!
Sep 22 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.