[macruby-changes] [709] MacRuby/trunk/lib/hotcocoa/mappings/label.rb
source_changes at macosforge.org
source_changes at macosforge.org
Thu Nov 6 07:31:36 PST 2008
Revision: 709
http://trac.macosforge.org/projects/ruby/changeset/709
Author: rich at infoether.com
Date: 2008-11-06 07:31:34 -0800 (Thu, 06 Nov 2008)
Log Message:
-----------
add font and color
Modified Paths:
--------------
MacRuby/trunk/lib/hotcocoa/mappings/label.rb
Modified: MacRuby/trunk/lib/hotcocoa/mappings/label.rb
===================================================================
--- MacRuby/trunk/lib/hotcocoa/mappings/label.rb 2008-11-04 19:52:24 UTC (rev 708)
+++ MacRuby/trunk/lib/hotcocoa/mappings/label.rb 2008-11-06 15:31:34 UTC (rev 709)
@@ -1,4 +1,10 @@
HotCocoa::Mappings.map :label => :NSTextField do
+
+ constant :text_align, {
+ :right => NSRightTextAlignment,
+ :left => NSLeftTextAlignment,
+ :center => NSCenterTextAlignment
+ }
defaults :selectable => false, :bordered => false, :drawsBackground => false, :frame => DefaultEmptyRect, :layout => {}
@@ -8,4 +14,16 @@
tf
end
+ custom_methods do
+
+ def text_align=(value)
+ setAlignment(value)
+ end
+
+ def text_color=(value)
+ setTextColor(value)
+ end
+
+ end
+
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20081106/2a806571/attachment.html>
More information about the macruby-changes
mailing list