Click here to Skip to main content
15,935,429 members

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.