Ext. Form. Field. Trigger triggering Field

Source: Internet
Author: User

1. Main configuration of Ext. Form. Field. Trigger

Configuration item Type Description
Editable Boolean Whether to allow editing of text directly. If it is set to false, editing is not allowed. You can only set it through the trigger button. The default value is true.
Hidetrigger Boolean Whether to hide the trigger button. The default value is false.
Repeattriggerclick Boolean If the value is true, a click repeater is added to the trigger button. The default value is false.
Readonly Boolean Whether the field is read-only. If it is true, the user is prevented from modifying the field content and hiding the trigger button. The default value is false.
Repeattriggerclick Boolean If this parameter is set to true, a repeat operator is automatically added.
Selectonfocus Boolean Whether to select the existing text in the input box immediately when getting the focus. The default value is false. This configuration takes effect only when editable is true.

2. Ext. Form. Field. Trigger example

Code:

<!  Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"  >  <  Html  Xmlns  = "Http://www.w3.org/1999/xhtml"  >  <  Head  Runat  = "Server"  >      <  Title >  Ext. Form. Field. Trigger example  </  Title  >      <  Link  Href  = "Ext-4.0.7-gpl/resources/CSS/ext-all.css"  REL  = "Stylesheet"  Type  = "Text/CSS"   />      <  Script SRC  = "Ext-4.0.7-gpl/Bootstrap. js"  Type  = "Text/JavaScript"  > </  Script  >      <  Script  Type  = "Text/JavaScript"  >  Ext. onready (  Function (){  VaR  FRM  =   New  Ext. Form. Panel ({Title:  "  Ext. Form. Field. Trigger example  "  , Bodystyle:  " Padding: 5  "  , Frame:  True  , Height:  100  , Width:  240  , Renderto: Ext. getbody (), defaults: {labelseparator:  " :  "  , Labelwidth:  80  , Width:  230  , Labelalign:  "  Left  " }, Items: [{xtype:  "  Triggerfield  "  , ID:  "  Memo  "  , Fieldlabel:  " Trigger Field  "  , Hidetrigger:  False  , Ontriggerclick:  Function  (){  VaR  Memo  = FRM. getform (). findfield (  "  Memo  "  ); Ext. MessageBox. Alert (memo. getvalue (); Ext. getcmp (  "  Memo  "  ). Setvalue (  " Test  "  ) ;}}]}) ;});  </  Script  >  </  Head  >  <  Body  >  </  Body  > </  Html  > 

:

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.