Sephiroth
http://sephiroth.scifi-action.de/board/

"Edit & Save"
http://sephiroth.scifi-action.de/board/viewtopic.php?f=4&t=13
Seite 1 von 1

Autor:  Sephiroth [ 18. März 2008 00:09 ]
Betreff des Beitrags:  "Edit & Save"

alias edit_test {
  dialog $iif($dialog(edit_test),-v,-m) edit_test edit_test
}
dialog edit_test {
  title "Edit Test"
  size -1 -1 200 150
  option pixel
  button "Edit", 1, 150 4 50 20
  edit "", 2, 2 5 146 20,hide
  text "Edit this text and save it", 3, 8 8 142 16
  button "Edit", 4, 150 24 50 20
  edit "", 5, 2 25 146 20,hide
  text "2nd line", 6, 8 28 142 16
  button "Edit", 7, 150 44 50 20
  edit "", 8, 2 45 146 20,hide
  text "3rd line", 9, 8 48 142 16
  button "Edit", 10, 150 64 50 20
  edit "", 11, 2 65 146 20,hide
  text "4th line", 12, 8 68 142 16
  button "Edit", 13, 150 84 50 20
  edit "", 14, 2 85 146 20,hide
  text "5th line", 15, 8 88 142 16
  button "Edit", 16, 150 104 50 20
  edit "", 17, 2 105 146 20,hide
  text "6th line", 18, 8 108 142 16
  button "Ok", 19, 50 130 50 20, Ok default
  button "Cancel", 20, 100 130 50 20, Cancel
}
on *:dialog:edit_test:sclick:1,4,7,10,13,16:{ edit $dname $did $calc($did +1) $calc($did +2) }
alias -l edit {
  var %x = $1
  tokenize 32 $2-4
  if ($did($1).text == Edit) { did -frav %x $2 $did($3).text | did -hra %x $3 | did -tra %x $1 Save }
  else { if ($dialog(%x).ok) { did -t %x $dialog(%x).ok } | did -rav %x $3 $did($2).text | did -rh %x $2 | did -ra %x $1 Edit }
}

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/