in the last post, we went over what I mean by the concept of structured editing in Word. I deliberately skipped over the awesome work we did in this same space in Word 2003, and I'm going to keep saving that for the future. In this post, I want to finish my first thought and go through the types of controls, and what they're capable of/useful for. in Word 2007 first post,
Office 2007, we talked about how within the Developer tab, the Controls group exposes all seven control types: me talk a little bit more about how we decided on that set, and what each of them do, starting in the top left. Text – A lot of people think this control saves content in the Rich Text Format (RTF). Although it's a neat idea, this control is actually designed to allow content controls to span just about anything that you can create in Word (tables, text boxes). The only restriction is that the control must either contain >1 paragraph; or exactly 1 or more paragraphs. Don't worry though, Word won't let you break that rule – we'll move the control if you're going to do something invalid to the closest possible match. Plain Text – This control is based on the rich text content control, but applies a few additional restrictions: It can be anything up to and including one paragraph, but doesn't allow multiple paragraphs. The contents of the control have to be formatted uniformly – so this text works, but this text would not be allowed. It doesn't mean *no* formatting, just that it all has to be the same. Again, Word makes sure of this. J Picture – The control can only contain a single picture. If there's no picture, a button appears to let you select one directly within the document. That picture can have all of the new Word 2007 effects applied to it,
Microsoft Office Standard 2010, though. Drop-down List – A drop-down list. Also inherits the plain text control restrictions. Box – A drop-down list that also allows you to type directly in it if you don't like the choices. This control inherits from the plain text control. Within a combo box, you use the Properties dialog to specify the pre-defined entries for the drop-down list. Date Picker – Provides a visible calendar for the user to pick a date, or they can type it in directly. Also inherits the plain text control restrictions. this control, you can also use the properties to set how the date should look – 1/1/06 vs. January 1, 2006 vs. Jan 2006; and also what language the calendar and date text should appear in (Avril vs. April). Block ############## – This one is the hardest to explain fully, and not coincidentally,
Windows 7, it's also the coolest. We need a post on building blocks before this makes sense, but I like to think of it as a combo box,
Microsoft Office 2010 Home And Business, where the pre-defined choices aren't just text strings, but rather rich blocks of content. For example, a choice between three different legal clauses within a contract. all of the controls also share a set of common properties: – Each of the controls supports a granular set of locks (preventing deletion of the control itself and/or preventing the content from being edited) as discussed in this post Titles – Each control can have an optional user-friendly title displayed when the control is edited, like this: Tags and IDs – If you're developing a solution based on Word 2007, each of these controls can has a document-level unique ID that can be used to uniquely identify it, as well as an optional tag string. Placeholder Text – The instructional text displayed when the control is blank can be customized into whatever you want (both text and formatting). More on this part later. 'Self-Destruct' – Any of the controls can be set to auto-delete themselves when their contents are edited (so you can have a one-time only date picker,
Office 2010 Code/, for instance). But Why? that set? When we set out to add more structured editing capability to Word, we spent a lot of time looking at what it meant to structure a *document* vs. building a form. That thinking led us into a lot of research about what it means to have form-like UI within a rich document, whose printed output is also extremely important. see the set we ended up with in my list above, but the biggest outcome of our thinking was the way in which we added the form UI to the Word document. If you play with the controls in a document, you'll notice that when you're not editing them, there's no UI at all distinguishing them from regular content ( in other words, the frame above only appears when you're inside the control's content) – a big goal for us when we set out, and the subject of my next post. <div