Text Not Being Highlighted When Selected In Word For Mac

Active1 year, 1 month ago

I've implemented a notepad application in c#,all the feaures work perfectly,there is only one thing which I can't implement exactly.there are some menuitems in the edit dropdown menu,but their enabled property must change according to the situation of the textbox,I have a problem with two situations and I'm looking for an event in order to change their enabled property in this event's eventhandler,here is the problem:

Jul 17, 2009  Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel. I received a document in which a lot of text had been highlighted. I need to remove it but when I select the text and on the Format Palette select None on the shading icon or click on File>Undo Highlighting. Using TextEdit, the Mac equivalent to Notepad A Closer Look At The TextEdit Word Processing Program [Mac] A Closer Look At The TextEdit Word Processing Program [Mac] Read More, you can copy and paste text as in the first method outlined above.

2)When some text is selected in the textbox,delete,copy and paste options should get enabled.how should I detect it?I've tested texchanged event an I've written a condition like the code below but it didn't work,just the clipboard works well:

Text Not Being Highlighted When Selected In Word For Mac

How should I solve my problem,by the way I have to use a textbox not a richtextbox.Any suggestions will be appreciated.Thanks a lot

user1831490

5 Answers

To find out selection

For clipboard content, use

Check clipboard content by,

This is implemented in the code. You can use it directly as above

Most important, don't forget

This is the complete code with menu item

Lingasamy SakthivelLingasamy Sakthivel
8,4439 gold badges45 silver badges86 bronze badges

Text Not Being Highlighted When Selected In Word For Mac Free

roadrunner66roadrunner66
4,3213 gold badges20 silver badges35 bronze badges

Well, in my opinion the easiest way to go with this is to define enabling/disabling method:

and attach it to the editMenuItem.DropDownOpened event (when using Forms) or editMenuItem.SubmenuOpened event (when using WPF; You may also want to use RoutedEventArgs instead of EventArgs in this case).

Alternatively, if You're using WPF, You could make use of the textBox1.SelectionChanged event. It's not present in Forms, so in that case You probably should use a combination of textBox1.MouseUp and textBox1.KeyUp events.

Grx70Grx70
7,7741 gold badge25 silver badges45 bronze badges
ScruffyScruffy
UbaldinGUbaldinG
Being

Fields in Word are bits of code that are placeholders for data that changes. For example, when you insert page numbers into the header or footer of a document, Word actually creates a field that inserts the correct page number on each page.

There are a lot of built-in fields available in Word, such as the current date, the date a document was last saved, the file name, and the number of words in a document. By default, when you insert a field into a document, it is shaded (not highlighted) when you put the cursor anywhere in the field. When you select an entire field, it is both shaded and highlighted. The shading on fields can be helpful to make it easier to find the fields in your document. However, if you’re going to share the document with others or use it in a presentation, you might want to turn off the field shading completely so it’s not distracting for others. We’ll show you where to change this setting for shading on fields.

To begin, click the “File” tab.

On the backstage screen, click “Options” in the list of items on the left.

The “Word Options” dialog box displays. Click “Advanced” in the list of items on the left.

Scroll down to the “Show document content” section and select an option from the “Field shading” drop-down list.

The default option is “When selected”, which means that a field is shaded when you place the cursor anywhere in that field. Select “Never” if you don’t want any fields to ever be shaded, or “Always” if you want all fields to always be shaded even when the cursor is somewhere else.

Click “OK”.

We selected “Never” so our fields are not shaded at all now.

NOTE: When you select “When selected” for the “Field shading” option, each field displays a gray background when you click within that field. However, the gray shading does not mean that the field itself is selected. Double-click the field or drag the mouse over it to select it. Then highlighting is added to the gray shading indicating the field is selected.

READ NEXT
  • › What Can I Do with My Old iPhone?
  • › How to Stream UFC 242 Khabib vs. Poirier Live Online
  • › Free Download: Microsoft’s PowerToys for Windows 10
  • › How to Overclock Your Computer’s RAM
  • › What’s New in Chrome 77, Arriving September 10