Created
August 11, 2011 01:59
-
-
Save daveray/1138754 to your computer and use it in GitHub Desktop.
Seesaw File Chooser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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