“動作物件”的版本间的差异
Pegasusroe(讨论 | 贡献) 小 (→下拉式選單) |
Pegasusroe(讨论 | 贡献) (→下拉式選單) |
||
第17行: | 第17行: | ||
請看以下的影片說明(沒有錄音): | 請看以下的影片說明(沒有錄音): | ||
− | [[File:YoutubeCombobox.png|link=http://www. | + | [[File:YoutubeCombobox.png|link=http://www.youtube.com/watch?v=AzCOVnMjEb0]] |
[[Category:Awaiting Translation]] | [[Category:Awaiting Translation]] |
2011年10月2日 (日) 11:29的版本
For interactive worksheets with scripting Action Objects may come handy. There are four types of them
Checkboxes
Checkboxes are graphical representations of Boolean values. See Check Box to Show / Hide Objects Tool for details. Checkboxes can be created using the aforementioned tool or Checkbox Command.
Input Boxes
Input Boxes work as text inputs for scripts. The script is triggered by changing text in the Input Box and either pressing enter or leaving the Input Box. The inserted value may be accessed using the %0 variable.
a=a+%0
in script will increase number a by the entered value. Works only if a is free.If you want the Input Box to change value of a free object (or redefine dependent object), you may define that object as linked. This way you don't have to insert any script. Input Boxes can be created using Insert Input Box Tool or InputBox Command.
Buttons
Buttons are meant to trigger scripts by being clicked. Although scripts can be triggered by clicking any other object (e.g. an image), using buttons for this makes your worksheet more intuitive. Input Boxes can be created using Insert Button Tool or Button Command.
下拉式选单
下拉式选单的功能只有试算表中才有。你可以在储存格中输入一个集合(如:A1={1,2,3,4}),然后打开试算表选项,并勾选“使用按钮与勾选框”,这时储存格就会变为一个下拉式选单。如果在程式中要使用目前下拉式选单所选择的项目,可以使用 SelectedIndex 与 SelectedElement 两个指令。
请看以下的影片说明(没有录音):