예제 #1
0
 public static void SetTextColor(this NSButton button, NSColor textColor)
 {
     NSMutableAttributedString attrTitle = new NSMutableAttributedString(button.AttributedTitle);
     NSUInteger len = attrTitle.Length;
     NSRange range = new NSRange(0, len);
     attrTitle.AddAttributeValueRange(NSAttributedString_AppKitAdditions.NSForegroundColorAttributeName, textColor, range);
     attrTitle.FixAttributesInRange(range);
     button.AttributedTitle = attrTitle;
     attrTitle.Release();
 }
예제 #2
0
 public void setFillColor(NSColor color)
 {
     this.fillColor.SafeRelease();
     this.fillColor = color;
     this.fillColor.SafeRetain();
 }
예제 #3
0
 public void setStrokeColor(NSColor color)
 {
     this.strokeColor.SafeRelease();
     this.strokeColor = color;
     this.strokeColor.SafeRetain();
 }
예제 #4
0
 public void setColor(NSColor aColor)
 {
     this.setStrokeColor(aColor);
     this.setFillColor(this.strokeColor.ColorWithAlphaComponent(0.2f));
 }