Re: Programmatically creating NSButton
Re: Programmatically creating NSButton
- Subject: Re: Programmatically creating NSButton
- From: Greg Hulands <email@hidden>
- Date: Sat, 24 Apr 2004 20:16:25 +1000
Hi Andreas,
Thanks for the reply. I have tried that but it is just that the
vertical alignment is not correct.
NSButton *aqua = [[NSButton alloc]
initWithFrame:NSMakeRect(0,0,100,23)];
[[aqua cell] setControlSize:NSRegularControlSize];
[aqua setButtonType:NSMomentaryPushInButton];
[aqua setBordered:YES];
[aqua setBezelStyle:NSRoundedBezelStyle];
[aqua setImagePosition:NSNoImage];
[aqua setAlignment:NSCenterTextAlignment];
[[aqua cell] setControlTint:NSBlueControlTint];
[aqua setEnabled:YES];
[aqua setFont:[NSFont systemFontOfSize:[NSFont
systemFontSizeForControlSize:NSRegularControlSize]]];
[demime 0.98b removed an attachment of type image/png which had a name of b_New_a.png]
A picture tells a thousand words!
Any clues?
Greg
On 24/04/2004, at 7:50 PM, Andreas Mayer wrote:
>
Am 24.04.2004 um 05:43 schrieb Greg Hulands:
>
>
> What am I doing wrong?
>
>
You might need to set the correct font for the button's cell.
>
>
>
Andreas
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.