Need help or advice ? Come to the Icy club ! - Every Wenesday morning from 9h30 to 12h30 - Francois Jacob Building - Main hall - Pasteur
Register

Create Dialog

by tprovoost / Thomas Provoost

Creates a Dialog behaving like ImageJ macros'.

version 1 (last version):

download to use and modify in Icy. How do I use scripts ? A Problem ? ask the community.
Changelog for this version: initial version
importClass(Packages.plugins.tprovoost.scripteditor.uitools.userdialogs.Dialog)

dlg = new Dialog("My Dialog") // creation
dlg.addNumber("A number", 12)

// Combo Box with the array as choices, last value is the default
dlg.addChoice("A choice", ["Choice 1", "Choice 2", "Choice 3"], "Choice 2")

// Text Fields
dlg.addString("A String", "Hello world!")
dlg.addString("Another String", "Bye world!")

// A slider and the min / max / default values
dlg.addSlider("A slider", 0, 10, 5)

dlg.show()

res = dlg.getResult()
if (!res) throw "User canceled"

println(dlg.getNumber())
println(dlg.getChoice())
println(dlg.getString())
println(dlg.getString())
println(dlg.getNumber())

This script has no documentation. A Problem ? ask the community.



Icy script publication Id : I6I4F3