Illustration: Use of Rich Text in DevExpress RichEditControl, with the source code and official API,

Source: Internet
Author: User

Illustration: Use of Rich Text in DevExpress RichEditControl, with the source code and official API,

 

Half past nine. I just wrote 1 and 2. It's time to go home and continue writing tomorrow.

What else do you need? Leave a message saying that I will continue to add it tomorrow.

 

 

I haven't played DevExpress for a long time. I downloaded a video today and found it was updated to 14.2.5 .. I will go.

Topic of this chapter:

If you don't talk nonsense, go to the topic.

 

1. Create a project and build a form

1. Create a C #. NET WinForms application and delete the default form:

 

2. Right-click the project-"Add DevExpress Item"-"New Item ...":

 

3. Open the new DevExpress item window, select "Form", create a new DevExpress Form item, and name the Form. Here I set "FrmMain ":

 

4. Expand the toolbox-"Rich Text Editor", find the RichEditControl and drag it to the form:

 

5. Set RichEditControl attributes:

> Rename RichEditControl and change the name attribute to "richEditMain"

> Set the Dock to Fill the entire form.

> Change the default Text value to "welcome to the ghost blog !"

> Remove the default ruler and set the ActiveViewType attribute to "Simple". The control is more compact. The default format is "PrintLayout:

 

 

 

II,Add a toolbar to RichEditControl

. Since it is a rich text editor, there have been tool bar options such as the blog garden editor for a long time:

How can we set it? Do you need to write them one by one? Of course not.

RichEditControl of DevExpress provides a very rich set of tool options. There are two forms here.

The first is the Ribbon menu format:

 

The other is the rule Group in the form of a toolbar:

 

I personally think it is quite good. You can select a specific form based on the project's needs. The following describes how to add the two:

The first is the pull Group in the form of Ribbon expanded menus:

Select the RichEditControl control. The Black Triangle menu item is displayed in the upper right corner. Click. The second-level menu option is displayed:

 

First, click "Create Ribbon" to Create a Ribbon menu, and then click the triangle in the upper right corner. Many new options will appear:

 

At a glance, the first "Create All Tabs" must be used to Create All menu options, while each of the following, such as "File Tabs", is an option related to File operations, as needed, you can add them by yourself. I added all for the demonstration:

 

Then, let's look at the rule Group in the form of toolbar:

 

The remaining options are the same as those above. Click "Create... Tabs" and select "Create... Tabs:

 

This is the option for adding tools. Is it very simple and powerful? Haha.

However, I personally suggest that you do not add them to the system as soon as they appear powerful and motionless. Otherwise, they will look messy.

In addition, these options all have event processing by default, and basically no other code needs to be written. Therefore, you can simply delete the options you need to add or remove them.

 

 

 

 

3. create custom toolbar options

 

 

How can we predict the future? Continue tomorrow...

 

Half past nine. I just wrote 1 and 2. It's time to go home and continue writing tomorrow.

What else do you need? Leave a message saying that I will continue to add it tomorrow.

 

 

[This article is from the lone shadow Blog: http://www.cnblogs.com/lonelyshadow. the code is easy and you can refer to it for help .]

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.