Difference between revisions of "Dialog basics"

From Scriptwiki
Jump to: navigation, search
m
m
Line 24: Line 24:
  
 
dialog [-l] name {
 
dialog [-l] name {
 
+
title "text"
  title "text"
+
icon filename, index
  icon filename, index
+
size x y w h
  size x y w h
+
option type (dbu, pixels, notheme)
  option type (dbu, pixels, notheme)
+
text "text", id, x y w h, style  (right, center, nowrap)
 
+
edit "text", id, x y w h, style  (right, center, multi, pass, read, return, hsbar, vsbar, autohs, autovs, limit N)
  text "text", id, x y w h, style  (right, center, nowrap)
+
button "text", id, x y w h, style  (default, ok, cancel, flat, multi)
  edit "text", id, x y w h, style  (right, center, multi, pass, read, return, hsbar, vsbar, autohs, autovs, limit N)
+
check "text", id, x y w h, style  (left, push, 3state)
  button "text", id, x y w h, style  (default, ok, cancel, flat, multi)
+
radio "text", id, x y w h, style  (left, push)
  check "text", id, x y w h, style  (left, push, 3state)
+
box "text", id, x y w h, style
  radio "text", id, x y w h, style  (left, push)
+
scroll "text", id, x y w h, style (top left bottom right horizontal range N N)
  box "text", id, x y w h, style
+
list id, x y w h, style          (sort, extsel, multsel, size, vsbar, hsbar, check, radio)
 
+
combo id, x y w h, style          (sort, edit, drop, size, vsbar, hsbar)
  scroll "text", id, x y w h, style (top left bottom right horizontal range N N)
+
icon id, x y w h, filename, index, style    (noborder top left bottom right small large actual)
 
+
link "text", id, x y w h
  list id, x y w h, style          (sort, extsel, multsel, size, vsbar, hsbar, check, radio)
+
tab "text", id, x y w h
  combo id, x y w h, style          (sort, edit, drop, size, vsbar, hsbar)
+
tab "text", id
 
+
menu "text", menuid [, menuid]
  icon id, x y w h, filename, index, style    (noborder top left bottom right small large actual)
+
item "text", id [, menuid]
 
+
item break, id [, menuid]
  link "text", id, x y w h
 
 
 
  tab "text", id, x y w h
 
  tab "text", id
 
 
 
  menu "text", menuid [, menuid]
 
 
 
  item "text", id [, menuid]
 
  item break, id [, menuid]
 
 
 
 
}
 
}
  
 
The -l switch makes a dialog table local, so that it can only be accessed by other scripts in the same file.
 
The -l switch makes a dialog table local, so that it can only be accessed by other scripts in the same file.

Revision as of 11:59, 24 August 2006

Basic dialog commands and switches

/dialog -mdtsonkcvie name [table] [x y w h] [text]
Where name is the name by which you'll refer to the dialog, and table is the dialog table name used to create dialog

 -m	create a modeless dialog using 'table' /dialog -m name table
 -a	used with -m, uses currently  active window as the parent
 -x	close a dialog without triggering any events
 -d	open dialog on the desktop, used with -m
 -h	make dialog work with active server connection
 -t	set dialog title /dialog -t name text
 -s	set dialog size/pos /dialog -s name x y w h
 -r	centers dialog
 -bp	interprets size as dbu or pixels
 -o	set dialog ontop of all windows
 -n	unset ontop setting
 -k	click ok button
 -c	click cancel button
 -v	makes the dialog the active window
 -ie	minimize/restore the dialog if created on the desktop

The dialog table You can use the dialog prefix to create a dialog table called name in a script using this format:

dialog [-l] name { title "text" icon filename, index size x y w h option type (dbu, pixels, notheme) text "text", id, x y w h, style (right, center, nowrap) edit "text", id, x y w h, style (right, center, multi, pass, read, return, hsbar, vsbar, autohs, autovs, limit N) button "text", id, x y w h, style (default, ok, cancel, flat, multi) check "text", id, x y w h, style (left, push, 3state) radio "text", id, x y w h, style (left, push) box "text", id, x y w h, style scroll "text", id, x y w h, style (top left bottom right horizontal range N N) list id, x y w h, style (sort, extsel, multsel, size, vsbar, hsbar, check, radio) combo id, x y w h, style (sort, edit, drop, size, vsbar, hsbar) icon id, x y w h, filename, index, style (noborder top left bottom right small large actual) link "text", id, x y w h tab "text", id, x y w h tab "text", id menu "text", menuid [, menuid] item "text", id [, menuid] item break, id [, menuid] }

The -l switch makes a dialog table local, so that it can only be accessed by other scripts in the same file.