Blogs

Rachel Reese - DevExpress Scheduler & RichEdit Blog

WinForms Rich Text Editor – New Page Setup Dialog! (available now in v2011, volume 1)

     

We've introduced a whole new page setup dialog for you in 2011, volume 1! To get there, click the button on the bottom of the Page Setup section:

image

which will give you:

image

image

and

image

You can configure a huge list of things! Margins, orientation, paper size, which can be configured for the whole document, or by section, as well as options for sections, headers, and footers of your document.

There's also a new columns dialog, reachable by clicking the "more columns" option under "Columns" in the Page Setup section:

image

Again, columns can be configured by section, or for the whole document.

We also now support line-numbering documents from the UI! Simply choose from the line numbers drop down, and voila!

image

All of these features are still available at run time, too, from the DevExpress.XtraRichEdit.API.Native namespace. For example, to set up three columns (like our example): 

// Specify a measurement unit
richEditControl1.Document.Unit = DocumentUnit.Inch;
// Get the first section in a document
Section sectionDoc = richEditControl1.Document.Sections[0];
// Create columns and apply them to the document
SectionColumnCollection sectionColumnsLayout = 
    sectionDoc.Columns.CreateUniformColumns(sectionDoc.Page, 0.2f, 3);
sectionDoc.Columns.SetColumns(sectionColumnsLayout);

Check out the full list of supported properties:

Page Setup:
ShowPageSetupFormCommand
Section.Margins
SectionMargins
Section.Page
SectionPage
SectionPage.Landscape
SectionPage.PaperKind
SectionPage.Width
SectionPage.Height
Section.StartType
Document.DifferentOddAndEvenPages
Section.DifferentFirstPage

Columns Setup:
ShowColumnsSetupFormCommand
Section.Columns
SectionColumns
SectionColumn

Line Numbering:
ShowLineNumberingFormCommand
Section.LineNumbering
SectionLineNumbering
SectionLineNumbering.Start
SectionLineNumbering.CountBy
SectionLineNumbering.Distance
SectionLineNumbering.RestartType

For more information, see the following samples:
How to: Configure the Page Layout Programmatically
How to: Create a Three-Column Layout with Uniform Columns
Demo Module: Line Numbering

Published Jun 03 2011, 09:21 AM by Rachel Reese (DevExpress)
Bookmark and Share

Comments

 

Sigurd Decroos said:

Thank you!

Now the table dialog please :D...

June 3, 2011 2:03 PM
 

Geoff Stokeld said:

Terrific again.  Dou you provide the icons for ribbon and command bars for these extra features as well? That would be great.

June 3, 2011 9:29 PM
 

Martin Praxmarer - DevExpress MVP said:

Great - but why is it such hidden in an ribbon section button, no user will ever find this...?

June 4, 2011 2:58 AM
 

Robert Perry 1 said:

Absolutely love the new RichEdit improvements that are coming! More and more please! :-)

June 4, 2011 9:42 AM
 

Rachel Reese (DevExpress) said:

Sigurd, Which table dialog do you mean? We have the old-school Word-style insert table (where you enter numbers for columns and rows rather than highlight boxes) and we have the Table Properties dialog, if you right-click on the table.

Geoff, We provide everything you see here on the ribbon bars. :)

Martin, I would tend to agree, but that's exactly what Word does, also. We're just trying to maintain familiarity.

Robert, Thanks!

June 6, 2011 4:53 PM
 

Rachel Reese - DevExpress Scheduler & RichEdit Blog said:

We've been busy here at DevExpress – cracking out new videos on all our new version 2011, volume

July 18, 2011 5:17 PM
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.