FROM : Stéphane Sudre
DATE : Mon Jan 27 16:25:14 2003
On Monday, January 27, 2003, at 03:03 PM, Jirtme Laurens wrote:
> Le dimanche, 26 jan 2003, ` 23:15 Europe/Zurich, Matt Gemmell a icrit :
>
>> Hi folks,
>>
>> I'm displaying an NSMenu when my NSButton subclass is clicked, using
>> -[NSMenu +popUpContextMenu:...]. The menu displays at normal size,
>> i.e. the text of the items is the same size as the text in the >
>> menubar.
>>
>> I'd like my menu to look the same way that an NSPopUpButton's menu
>> does when the NSPopUpButton is set to "small", i.e. using the small
>> system font. Is that possible? I don't see any NSMenu or NSMenuItem
>> methods related to font or size, and calling NSControl's
>> -setControlSize: method on my NSButton has no effect on its menu (nor
>> would I expect it to).
>>
> You might not like my solution... but it is not so silly
>
> create a NSPopUpButton
> make it small
> make a copy of its menu
> release the pop up button
>
> you end with a small menu...
Just tried this as I'm also interested by a solution to this. It's not
working.
1) If you remove the NSPopUpButton, when you display the Menu in the
over view, the Application crashes as if someone was doing a dealloc on
the NSMenu instead of a release
2) If you keep the NSPopUpButton, when you display the menu in the
NSButton, the labels are big. Then if you click on the NSPopUpButton,
the labels are small the next time you display the menu of the NSButton.
This leads to make me think the "smallification" of the menu labels is
done in the method to draw the PopUp Menu of PopUpButton not before.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Mon Jan 27 16:25:14 2003
On Monday, January 27, 2003, at 03:03 PM, Jirtme Laurens wrote:
> Le dimanche, 26 jan 2003, ` 23:15 Europe/Zurich, Matt Gemmell a icrit :
>
>> Hi folks,
>>
>> I'm displaying an NSMenu when my NSButton subclass is clicked, using
>> -[NSMenu +popUpContextMenu:...]. The menu displays at normal size,
>> i.e. the text of the items is the same size as the text in the >
>> menubar.
>>
>> I'd like my menu to look the same way that an NSPopUpButton's menu
>> does when the NSPopUpButton is set to "small", i.e. using the small
>> system font. Is that possible? I don't see any NSMenu or NSMenuItem
>> methods related to font or size, and calling NSControl's
>> -setControlSize: method on my NSButton has no effect on its menu (nor
>> would I expect it to).
>>
> You might not like my solution... but it is not so silly
>
> create a NSPopUpButton
> make it small
> make a copy of its menu
> release the pop up button
>
> you end with a small menu...
Just tried this as I'm also interested by a solution to this. It's not
working.
1) If you remove the NSPopUpButton, when you display the Menu in the
over view, the Application crashes as if someone was doing a dealloc on
the NSMenu instead of a release
2) If you keep the NSPopUpButton, when you display the menu in the
NSButton, the labels are big. Then if you click on the NSPopUpButton,
the labels are small the next time you display the menu of the NSButton.
This leads to make me think the "smallification" of the menu labels is
done in the method to draw the PopUp Menu of PopUpButton not before.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Matt Gemmell | Jan 26, 23:15 | |
| Jérôme Laurens | Jan 27, 15:03 | |
| Stéphane Sudre | Jan 27, 16:25 | |
| Matt Gemmell | Jan 27, 18:05 | |
| Jérôme Laurens | Jan 27, 18:35 |






Cocoa mail archive

