Web lists-archives.com

Re: advice sought for program with GUI




Hi,

mick crane wrote:
> I've done pieces of simple calculations on 2D images in the past but when I
> go back and look at them think " now what does that do and what did I type
> to make it work".
> I'm thinking that if I do something now I should make a little GUI with
> buttons to click on that are self explanatory.

If there is already a program with full functionality but complicated
user interface, then i'd consider Tcl/Tk for the graphical frontend.

Tcl is not the most comfortable programming language, but Tk is about
the most easy GUI definition language that i know:
------------------------------------------------------------------------
#!/usr/bin/wish

proc say_test {} {
  set echo_result [exec /bin/echo "TEST"]
  puts "Output of external program: $echo_result"
}

proc end_program {} {
  puts "Ending"
  exit 0
}

frame .test_frame

label .head_line -text "--- Headline ---"
pack .head_line -in .test_frame

button .test_button -text "Test" -command "say_test"
pack .test_button -in .test_frame

button .end_button -text "End" -command "end_program"
pack .end_button -in .test_frame

pack .test_frame
------------------------------------------------------------------------

Have a nice day :)

Thomas