Skip to content

Instantly share code, notes, and snippets.

@daveray
Created August 11, 2011 01:59
Show Gist options
  • Save daveray/1138754 to your computer and use it in GitHub Desktop.
Save daveray/1138754 to your computer and use it in GitHub Desktop.
Seesaw File Chooser
(use 'seesaw.core)
(use 'seesaw.chooser)
(def open-action
(action :name "Open" :key "menu O"
:handler
(fn [e]
(if-let [f (choose-file)]
(text! (select (to-root e) [:#my-text]) f)))))
(->
(frame
:size [640 :by 480]
:menubar (menubar :items [(menu :text "File" :items [open-action])])
:content (scrollable (text :id :my-text :multi-line? true)))
show!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment