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(); }
public void setFillColor(NSColor color) { this.fillColor.SafeRelease(); this.fillColor = color; this.fillColor.SafeRetain(); }
public void setStrokeColor(NSColor color) { this.strokeColor.SafeRelease(); this.strokeColor = color; this.strokeColor.SafeRetain(); }
public void setColor(NSColor aColor) { this.setStrokeColor(aColor); this.setFillColor(this.strokeColor.ColorWithAlphaComponent(0.2f)); }