Created
April 11, 2020 01:33
-
-
Save AndyObtiva/fb1471bd8606d3c81d5709dc113d5928 to your computer and use it in GitHub Desktop.
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
# You may clone glimmer repo, follow setup instructions, and run bin/girb then copy/paste code below | |
class RedLabel | |
include Glimmer::UI::CustomWidget | |
before_body { | |
@color = color(:red) | |
} | |
after_body { | |
body_root.on_mouse_up { | |
message_box = MessageBox.new(swt_widget.getShell) | |
message_box.setText("Red Label") | |
message_box.setMessage("This is a Red Label") | |
message_box.open | |
} | |
} | |
body { | |
label(:center) { | |
background @color | |
} | |
} | |
end | |
shell { | |
text 'Example' | |
red_label { | |
text 'Click Me' | |
font height: 20 | |
} | |
}.open |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment