Created
September 25, 2010 01:36
-
-
Save Diullei/596349 to your computer and use it in GitHub Desktop.
This file contains 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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; Sample - Windows Form made in ClojureCLR | |
; Diullei Gomes | |
; [email protected] | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(System.Reflection.Assembly/LoadWithPartialName "System.Windows.Forms") | |
(import '(System.Windows.Forms MessageBox Form Button)) | |
(import '(System.Windows.Forms Application)) | |
(. Application EnableVisualStyles) | |
(. Application SetCompatibleTextRenderingDefault false) | |
(def btn (Button.)) | |
(doto btn | |
(.set_Top 50) | |
(.set_Text "Click!") | |
(.set_Size (new System.Drawing.Size 75 23)) | |
(.set_Location (new System.Drawing.Point 12 12)) | |
(.add_Click (gen-delegate EventHandler [sender args] (MessageBox/Show "I got clicked"))) | |
) | |
(def frm (Form.)) | |
(doto frm | |
(.. (get_Controls) (Add btn)) | |
(.set_ClientSize (new System.Drawing.Size 276 46)) | |
(.set_Text ":: Clojure Form ::") | |
(.ResumeLayout) | |
) | |
(. Application Run frm) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment