「アクションオブジェクト」の版間の差分

提供: GeoGebra Manual
移動先: 案内検索
 
1行目: 1行目:
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{objects}}
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{objects}}
:{{translate|Manual:Action Objects}}
+
[[スクリプティング|スクリプト]]を使ったインタラクティブなワークシートには,アクションオブジェクトが便利である.<br>
For interactive worksheets with [[Scripting|scripting]] Action Objects may come handy.<br>
+
それには4つのタイプがある:
There are four types of them:
+
 
 
==チェックボックス==
 
==チェックボックス==
Checkboxes are graphical representations of [[Boolean values]]. See [[File:Mode showcheckbox.svg|link=|22px]] [[Check Box Tool]] for details.
+
チェックボックスは,[[真偽値]]のグラフィカルな表現である.詳細は[[File:Mode showcheckbox.svg|link=|22px]] [[表示/非表示のチェックボックス_ツール]]を参照.チェックボックスは前述のツールまたは[[Checkbox コマンド]]を使って作成できる.
Checkboxes can be created using the aforementioned tool or the [[Checkbox Command]].
 
 
==入力ボックス==
 
==入力ボックス==
Input Boxes work as text inputs for [[Scripting|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.
+
入力ボックスは[[スクリプティング|スクリプト]]のテキスト入力として機能する.スクリプトは,入力ボックス内のテキストを変更し,{{KeyCode|Enter}}を押すか,入力ボックスから離れることで起動する,挿入された値には, %0 変数を使用してアクセスできる.
{{example|1=Input Box with <code>a=a+%0</code> in its ''OnClick'' script will increase number ''a'' by the entered value. Works only if ''a'' is [[Free, Dependent and Auxiliary Objects|free]].}}
+
{{example|1=入力ボックスの ''クリックして'' スクリプトに<code>a=a+%0</code>を指定すると,数値 ''a'' が入力された値だけ増加する.ただし, ''a'' [[自由、従属、補助オブジェクト#自由オブジェクト|自由]]の場合のみ動作する.}}
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.<br>
+
入力ボックスに自由オブジェクトの値を変更させたい場合(または依存オブジェクトを再定義したい場合),そのオブジェクトをリンクとして定義することができる.そうすれば,スクリプトを挿入する必要はない.<br>
Input Boxes can be created using the [[File:Mode textfieldaction.svg|link=|22px]] [[Input Box Tool]] or the [[InputBox Command]].
+
入力ボックスは,[[入力ボックスを挿入_ツール]]または[[InputBox コマンド]]を使用して作成することができる.
  
 
==ボタン==
 
==ボタン==
Buttons are meant to trigger scripts by being clicked. Although scripts can be triggered by clicking any other object (e.g. an [[Image Tool|image]]), using buttons for this makes your worksheet more intuitive.<br>
+
ボタンは,クリックされることによってスクリプトをトリガーするためのものである.スクリプトは他のオブジェクト([[画像の挿入_ツール|画像]]など)をクリックしてもトリガーできるが,ボタンを使用すると,ワークシートがより直感的になる..<br>
Buttons can be created using the [[File:Mode buttonaction.svg|link=|22px]] [[Button Tool]] or the [[Button Command]].
+
ボタンは[[File:Mode buttonaction.svg|link=|22px]] [[ボタン_ツール]]または[[Button コマンド]]で作成できる.
 
==ドロップダウンリスト==
 
==ドロップダウンリスト==
If you want to show the contents of a list, organized in a drop-down list:
+
ドロップダウンリストでリストの内容を表示したい場合は:
* in the [[File:Menu view graphics.svg|link=|16px]] [[Graphics View]]: check the ''Draw as drop-down list'' box in the ''Basics'' tab of the [[File:Menu-options.svg|link=|18px]] [[Properties Dialog]] of the list.
+
* [[File:Menu view graphics.svg|link=|16px]] [[グラフィックスビュー]]の場合:リストの[[File:Menu-options.svg|link=|18px]] [[プロパティダイアログ]] の ''基本'' タブにある ''ドロップダウンリストとして表示'' にチェックを入れる.
* in the [[File:Menu view spreadsheet.svg|link=|16px]] [[Spreadsheet View]]: enter a list into the spreadsheet, then check the ''Use Buttons and Checkboxes'' box in the [[File:Menu view spreadsheet.svg|link=|16px]] ''Spreadsheet Options''
+
* [[File:Menu view spreadsheet.svg|link=|16px]] [[表計算ビュー]]の場合: スプレッドシートにリストを入力し,[[File:Menu view spreadsheet.svg|link=|16px]] ''スプレッドシートオプション'' の ''ボタンとチェックボックスを使用する'' をチェックする.
The selected element of a drop-down list may be also obtained using [[SelectedIndex Command|SelectedIndex ]] and [[SelectedElement Command|SelectedElement ]] commands.
+
ドロップダウンリストの選択された要素は,[[SelectedIndex コマンド|SelectedIndex ]]コマンドと[[SelectedElement コマンド|SelectedElement ]]コマンドを使って取得することもできる.
  
{{example| To create a  drop-down list with three functions <code>x+1</code>, <code>x^2</code>, <code>sqrt(x)</code>, first create a list by typing
+
{{example| 3つの関数<code>x+1</code>, <code>x^2</code>, <code>sqrt(x)</code>でドロップダウンリストを作成する,まず入力バーに<code>L={x+1, x^2,sqrt(x)}</code>と入力してリストを作る.次に,''数式ビュー'' でリスト ''L'' を右クリックし,''オブジェクトのプロパティ...'' を選択する.表示されたダイアログウィンドウの ''基本'' タブにある ''ドロップダウンリストとして表示'' にチェックを入れる.ドロップダウンリストを説明するキャプションを入力することもできる.現在選択されている関数を ''グラフィックスビュー'' にプロットするには,入力バーに<code>SelectedElement(L)</code> と入力する.}}
<code>L={x+1, x^2,sqrt(x)}</code> in the input bar. Then right-click the list in ''Algebra View'' and select ''Object Properties...''. Select the ''Draw as drop-down list'' option in the appearing dialog window. You can also enter a caption that describes the drop-down list. In order to plot in ''Graphics View'' the currently selected function, enter the command <code>SelectedElement(L)</code> in the input bar .}}
 

2024年4月14日 (日) 09:57時点における最新版

Accessories dictionary.png
このページは印刷とpdf用の公式マニュアルの一部です。構造上の問題から通常のユーザーはこのページを編集できません。誤りを見つけた場合は私たちに連絡して下さい。ユーザーが編集できるバージョンへ


スクリプトを使ったインタラクティブなワークシートには,アクションオブジェクトが便利である.
それには4つのタイプがある:

チェックボックス

チェックボックスは,真偽値のグラフィカルな表現である.詳細はMode showcheckbox.svg 表示/非表示のチェックボックス_ツールを参照.チェックボックスは前述のツールまたはCheckbox コマンドを使って作成できる.

入力ボックス

入力ボックスはスクリプトのテキスト入力として機能する.スクリプトは,入力ボックス内のテキストを変更し,Enterを押すか,入力ボックスから離れることで起動する,挿入された値には, %0 変数を使用してアクセスできる.

例: 入力ボックスの クリックして スクリプトにa=a+%0を指定すると,数値 a が入力された値だけ増加する.ただし, a自由の場合のみ動作する.

入力ボックスに自由オブジェクトの値を変更させたい場合(または依存オブジェクトを再定義したい場合),そのオブジェクトをリンクとして定義することができる.そうすれば,スクリプトを挿入する必要はない.
入力ボックスは,入力ボックスを挿入_ツールまたはInputBox コマンドを使用して作成することができる.

ボタン

ボタンは,クリックされることによってスクリプトをトリガーするためのものである.スクリプトは他のオブジェクト(画像など)をクリックしてもトリガーできるが,ボタンを使用すると,ワークシートがより直感的になる..
ボタンはMode buttonaction.svg ボタン_ツールまたはButton コマンドで作成できる.

ドロップダウンリスト

ドロップダウンリストでリストの内容を表示したい場合は:

  • Menu view graphics.svg グラフィックスビューの場合:リストのMenu-options.svg プロパティダイアログ基本 タブにある ドロップダウンリストとして表示 にチェックを入れる.
  • Menu view spreadsheet.svg 表計算ビューの場合: スプレッドシートにリストを入力し,Menu view spreadsheet.svg スプレッドシートオプションボタンとチェックボックスを使用する をチェックする.

ドロップダウンリストの選択された要素は,SelectedIndex コマンドとSelectedElement コマンドを使って取得することもできる.

例: 3つの関数x+1, x^2, sqrt(x)でドロップダウンリストを作成する,まず入力バーにL={x+1, x^2,sqrt(x)}と入力してリストを作る.次に,数式ビュー でリスト L を右クリックし,オブジェクトのプロパティ... を選択する.表示されたダイアログウィンドウの 基本 タブにある ドロップダウンリストとして表示 にチェックを入れる.ドロップダウンリストを説明するキャプションを入力することもできる.現在選択されている関数を グラフィックスビュー にプロットするには,入力バーにSelectedElement(L) と入力する.
© 2024 International GeoGebra Institute