例(カスタムダイアログ)
フォームダイアログの作成方法を示す簡単な例を取りあげます。
app = pf.GetApplication() -- ... form = pf.Form.New("Simple Form Dialog") -- Create the dialog -- Create the dialog's items spResultSelector = pf.FormDataSelector.New("Select an S-parameter result", pf.Enums.FormDataSelectorType.SParameter) lineEdit = pf.FormLineEdit.New("The title of the chart") lineEdit.Value = "Smith Chart" -- Add the items to the dialog form:Add(spResultSelector) form:Add(lineEdit) form:Run() -- Run the dialog -- Extract and use the chosen values smithChart = app.SmithCharts:Add() smithChart.Title.Text = lineEdit.Value smithChart.Traces:Add(spResultSelector.Value) -- ...

Figure 1. 簡単なフォームダイアログの例。