Re: How to set left side title to NSPopupButton
Re: How to set left side title to NSPopupButton
- Subject: Re: How to set left side title to NSPopupButton
- From: Keary Suska <email@hidden>
- Date: Tue, 12 Dec 2006 10:08:30 -0700
- Thread-topic: How to set left side title to NSPopupButton
on 12/12/06 3:51 AM, email@hidden purportedly said:
> I met with a problem when I add NSPopupButton to my UI:
> I want to add NSPopupButton with title to UI. The NSPopupButton control is
> added dynamically, and I want to let the title of this NSPopupButton control
> be displayed on left side of NSPopupButton control. And the length of title
> textfield will change with the actual length of title string. How can I do it?
> I tried "setTitle" but failed.
The NSTextField that acts as the label for the NSPopupButton has no relation
to the button, as far as I can tell. You need access to the NSTextField
(such as by an outlet or however), and use setStringValue: to change its
text. You could probably use -sizeToFit to resize, or use the various sizing
methods available.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden