Reprinted from: http://blog.csdn.net/testdll/archive/2006/12/31/1470589.aspx
How
DHTML
More attributes and events are extended
Ajax webshop
In the Attribute EditorAll those who have used Ajax webshop know that this Ajax Tool is fully visualized and is very similar to the development mode of Delphi. It provides functions such as Visual drag controls, attribute editing, event editing, and syntax prompts, however, sometimes it is strange that some standard DHTML attributes and events cannot be found, so you have to manually write code to complete attribute setting and event programming. I did the same at the beginning, but after some exploration, I found that AJAX webshop fully supports attributes and events extension by myself. The extension method is very simple. Let's look at my operations: first, find the XML file under the jcl directory. There are a lot of XML files below, which correspond to the controls on the component option board one by one. Open a few to see if there is an inheritance mechanism, no wonder there is almost no content in many XML files. Well, now we can find uicontrol. the content in XML is as follows:
<? XML version = "1.0" encoding = "gb2312"?> <Class classname = "uicontrol" visible = "true" iscontainer = "false" extends = "jclcontrol"> <imports> <import> jcl/control. JS </import> </imports> <private> </private> <protect> </protect> <public> </Public> <published> <Properties> <property name = "align" type = "string" editor = "selecteditor"> <Options> <option value = "center"/> <option value = "Left"/> <option value =" right "/> <option value =" Justify "/> </Options> </property> <property name =" disabled "type =" Boolean "editor =" selecteditor "> <options> <option value = "true"/> <option value = "false"/> </Options> </property> <property name = "innerhtml" type = "string"> </property> <property name = "classname" type = "string"> </property> <property name = "popupmenu" type = "popupmenu" editor = "objecteditor"> </property> <property name = "style" type = "style" editor = "treeeditor"> <Properties> <property name = "backgroundcolor" type = "string" editor =" coloreditor "> </property> <property name =" backgroundimage "type =" string "> </property> <property name =" bordercolor "type =" string "editor =" coloreditor ""> </property> <property name =" borderstyle "type =" string "editor =" selecteditor "> <Options> <option value =" NONE "/> <option value = "dotted"/> <option value = "Dashed"/> <option value = "solid"/> <option value = "double"/> <option value = "Groove "/> <option value = "ridge"/> <option value = "Inset"/> <option value = "window-Inset"/> <option value = "outset"/> </Options> </property> <property name = "borderwidth" type = "string"> </property> <property name = "borderleft" type = "string"> </Property> <property name = "bordertop" type = "string"> </property> <property name = "borderright" type = "string"> </property> <property name =" borderbottom "type =" string "> </property> <property name =" cursor "type =" string "editor =" selecteditor "> <Options> <option value =" all- scroll "/> <option value =" Auto "/> <option value =" col-resize "/> <option value =" crosshair "/> <option value =" default" /> <option value = "hand"/> <option value = "help"/> <option value = "move"/> <option value = "no-drop"/> <option value = "not-Allowed"/> <option value = "Pointer"/> <option value = "progress"/> <option value = "Row-resize"/> <option value = "text"/> <option value = "URL (URI) "/> <option value =" vertical-text "/> <option value =" wait "/> <option value =" *-resize "/> </Options> </ property> <property name = "display" type = "string" editor = "selecteditor"> <Options> <option value = "Block"/> <option value = "NONE "/> <option value = "inline"/> <option value = "inline-block"/> <option value = "table-header-group"/> <option value = "table -footer-group "/> </Options> </property> <property name =" color "type =" string "editor =" coloreditor "> </property> <property name = "fontfamily" type = "string"> </property> <property name = "fontsize" type = "string"> </property> <property name = "fontstyle" type = "string" editor = "selecteditor"> <Options> <option value = "normal"/> <option value = "italic"/> <option value = "oblique"/> </Options> </property> <property name = "paddingtop" type = "string"> </property> <property name = "paddingleft" type = "string"> </Property> <property name = "paddingright" type = "string"> </property> <property name = "paddingbottom" type = "string"> </property> <property name =" position "type =" string "default =" absolute "editor =" selecteditor "> <Options> <option value =" static "/> <option value =" absolute "/> <option value = "relative"/> </Options> </property> <property name = "textalign" type = "string" editor = "selecteditor"> <Options> <option value = "Left"/> <option value = "right"/> <option value = "center"/> <option value = "Justify"/> </Options> </Property> <property name = "visibility" type = "string" editor = "selecteditor"> <Options> <option value = "inherit"/> <option value = "visible"/> <option value = "hidden"/> </Options> </property> <property name = "wordwrap" type = "string" editor = "selecteditor"> <Options> <Option value = "normal"/> <option value = "break-word"/> </Options> </property> <property name = "zindex" type = "variant"> </property> </Properties> </property> <property name = "tabindex" type = "integer"> </property> <property name = "title" type = "string"> </property> </Properties> <Methods> </methods> <events> <event name = "onblur"> <Params> </event> <event name = "onclick"> <Params> </event> <event name = "ondblclick"> <Params> </event> <event name = "onfocus"> <Params> </event> <event name = "onkeydown"> <Params> </event> <event name = "onkeypress "> <Params> </event> <event name =" onkeyup "> <Params> </event> <event name =" onmousedown "> <Params> </event> <event name = "onmouseenter"> <Params> </event> <event name = "onmouseleave"> <Params> </Params> </event> <event name = "onmousemove"> <Params> </event> <event name = "onmouseout"> <Params> </Params> </event> <event name = "onmouseover"> <Params> </event> <event name = "onmouseup"> <Params> </Params> </event> <event name = "onmousewheel"> <Params> </event> </events> </published> </class> |
You can see this clearly. You just need to add the standard attributes and events in the msdn to the XML node. I added the following content:
<Event name = "onresize"> <Params> </event> |
Then restart webshop. Is there an onresize In the event column? haha. I also found that not only property events can be defined by myself, but also controls can be extended to the component option board by myself. I will tell you how to customize controls the next time I have no time.
Trackback: http://tb.blog.csdn.net/TrackBack.aspx? Postid = 1470589