15,890,282 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by BraveKnightFSJ (Top 2 by date)
BraveKnightFSJ
23-Oct-18 13:36pm
View
Thanks. I will give that a try later today when I go back to that
BraveKnightFSJ
16-Oct-18 20:10pm
View
Ok.
First thing i have rtfdirections.hideselection = false; this is to keep my selection from disappearing. I have that set in the constructor of the form.
As per Bill's question.
I have 2 combo box controls in a toolstrip. I have a tool strip combo box for the font name and a tool strip combo box for the sizes. I have changed it so the font changes on the SelectedIndex change event. This pulls the current style from the rich text box, and sets the font to the font from the cbofont.text and the size from cboSize.text.
I wasn't tracking any previous selection. When dealing with selected text should you assign it to a variable then make sure the selection stays to that variable.
I also noticed that sometimes when I click any toolstrip button my text selection just disappears which should not be the case. as you could see from the top i have it set not to hide selection.
No I wasn't clearing the selection. I assumed that when you select new text in the Rich text box it would just over write what was previously selected and use the new selection.
I put break points on all sources of code and added watches to the selected text and the selected text never changed unless the selection just went away and there were no breakpoints hit.