In such a case, you may want to have a button as in the previous section, but with the code shown in listing 4.
在此情况下,您可能希望拥有一个按钮(如前一部分中那样),但是要和清单4所示的代码结合使用。
What it does do is radically change the way you program: it defines rules that make it possible to apply complex transformations to code at the click of a button.
它仅仅是从根本上改变你编码的方式:它定义了一些规则,使得利用工具(例如点击按钮)完成代码的复杂转换成为可能。
To add a button to point back to the main screen of the application, add the code shown in listing 3.
要添加一个按钮来指向应用程序的主屏幕,可以添加清单3中所示的代码。
When you change your model (it happens, really), the EMF can keep the code synchronized to your model at the click of a button.
当您改变模型时(这种情况真的会出现),EMF可以通过单击一个按钮,就使代码和模型保持同步。
As an example, the code in Listing 38 shows a button in a canvas.
例如,清单38中的代码显示一个画布中的一个按钮。
Now, look at the similar code that USES a command button, instead (Listing 2).
现在,再看看使用命令按钮的类似代码,更换为(列表2)。
To demonstrate this code, let's start with a class for observing button clicks that simply counts the number of clicks.
要演示这部分代码,让我们从一个观察按钮点击和记录点击数目的类开始。
The main code creates the GUI with a button and progress bar.
主要代码创建带有一个按钮和进度条的GUI。
Without getting too deeply into the details of the GWT widget set, this code creates a button and a label.
这段代码将不会过多地深入GWT部件集的细节,而是创建按钮和标签。
No code is needed for a button of this type.
此类按钮不需要代码。
Let's look at the JSP source code that USES a command link and compare it to the source code that USES a command button.
现在让我们来比较一下使用命令链接的JS p源代码和使用命令按钮的源代码。
The iPhone style buttons in this simple example are wired together when a user clicks a button with the code in Listing 4.
当用户使用清单4中的代码单击一个按钮时,这个简单示例中的iPhone样式按钮彼此相互连接。
For example, if you want the progress bar to start when the user clicks a button, you can add an onclick event to the button, using the code that you see in Listing 1.
例如,如果您想要这个进展在用户点击一个按钮时开始,您可以在一个按钮上添加一个onclick事件,使用您在列表1中所看到的代码。
Similarly, to set the values for a button, you might enter the code shown in Listing 2.
类似地,要设置按钮的值,您可以输入清单2中所示的代码。
You also want to supply a Cancel button with code as follows.
您还要提供一个Cancel按钮,其代码如下。
The RunMailRules class contains a run() method; this is where your code gets called when the button is clicked.
RunMailRules类包含一个run()方法;这就是单击按钮时调用代码的地方。
The code does not use the traditional onClick within the button but USES the Dojo events system to register a method to call upon loading of the page.
代码没有在按钮内使用传统的onClick,而是使用Dojo事件系统注册一个在装载页面时调用的方法。
I decided to extend the ReportViewer code that I wrote earlier and change the ReportPath property whenever the user selects a report and clicks the Go button.
我决定扩展我早期编写的ReportViewer代码并且只要用户选择某个报表并点击“Go”按钮就更改reportpath属性。
The final step is to create a new web page with the code to create the form and handle the submit event on the Validate button.
最后一步是用代码创建一个新web页面,来创建表单并处理Validate按钮上的提交事件。
Use this code snippet to create a button the user can press to write "Hello World!" to the debug window.
使用此代码片段创建一个按钮,用户可以按下该按钮将“Hello World !”写入调试窗口。
For example, to use a button in Flex, you can code the following in MXML (Multimedia XML): <a name="code-text"><mx:Button label="Submit"mx:Button>
例如,为了在Flex 中使用一个按钮,可以用 MXML(MultimediaXML)编写以下代码:<aname="code-text"><mx:Buttonlabel="Submit"
Within this form are two elements: a text area provided to allow users to enter plain Scilab code for execution and a Submit button that performs the form action.
此表单内有两个元素:一个文本区域用来供用户输入scilab代码以便执行;一个Submit按钮用来执行表单动作。
For a somewhat more complex example, you are encouraged to walk through the code sequence when the Dynamic button is selected in the WebView.
对于一个稍微复杂一点的例子,鼓励您好好看一下dynamic按钮在WebView中被选中时的代码段。
If instead the preceding code did not contain line 2 and if you used a second button with an Open page simple action to go to page2, the computed field would come back empty.
如果上述代码中不包含第二行内容,并且使用带有简单操作Openpage的第二个按钮以转到page2,那么computed字段将返回空值。
When a user presses the submit button, the code placed in the onsubmit handler is executed before the form is submitted to the server.
当用户按下submit按钮时,在向服务器提交表单之前将执行onsubmit处理程序中的代码。
Facebook makes software code available to website publishers which allows users of the websites to share links at the click of a button on their own Facebook page.
Facebook提供软件代码给网站的发布者们,使网站的用户可以通过点击其在Facebook上的页面按钮来分享链接。
Enter a project name, select the Create new project in workspace radio button and specify the location for code with the UI elements.
输入一个项目名称,选择Createnewprojectin workspace单选按钮,并指定UI 元素的代码位置。
There are three lines of code for the search: a click on the qs field, an inputChars for our search criteria, and a click on the search button.
有三行代码用于搜索:在qs域上的点击,用于我们的搜索标准的inputChars,以及在搜索按钮上的点击。
When a user clicks on the Generate button, he is shown what his badge looks like and presented with the HTML code that he can use to paste the badge into his blog or Web site.
当用户单击Generate按钮时,将显示标栏的外观,并呈现可用于将标栏粘贴到博客或Web 站点的HTML代码。
When a user clicks on the Generate button, he is shown what his badge looks like and presented with the HTML code that he can use to paste the badge into his blog or Web site.
当用户单击Generate按钮时,将显示标栏的外观,并呈现可用于将标栏粘贴到博客或Web 站点的HTML代码。
应用推荐