Aesthetic analysis of ExtJS in disabled and readonly

Source: Internet
Author: User

Analysis of aesthetics of Disabled and ReadOnly in ExtJS

The ExtJS. Assuming that the Set input box is a read-only property, the first consideration is readonly=true

It has the same effect as the normal input box, but does not agree with the input;

However, it is very easy to cause ambiguity, let the user first feel is that it is the input box, there is the impulse to input information, in fact, otherwise;

At this time, you can consider using the Disabled=true property

This will definitely not feel can input, a look to know disagree with the changes, but the font color is obviously very vague, so the effect is poor;

So. Use often still use readonly=true, but change the background color to do disabled better performance, effect such as the following:

The obvious feeling is that the input is forbidden and the font is clear. Code snippets such as the following:

{columnwidth:1,
Layout: ' Form ',
Defaults: {
Xtype: "TextField",
width:150,
Allowblank:true,
Readonly:true,

style: ' Background: #E6E6E6 '
},
items:[
{fieldlabel: ' event title ', Name: ' Event_title ', width:435}
]
},

Why choose ReadOnly instead of disabled? Another obvious difference:

Disabled=true, the form submission time cannot pass the data to the background action layer, but readonly=true can; this difference is consistent with the disabled and readonly performance differences of the tags in HTML.

Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.

Aesthetic analysis of ExtJS in disabled and readonly

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.