| Home 目次>ApplicationKit>NSBox このサイトはこちらに移転しました。 | |
setBoxType:
ボックスのボックスタイプをセットします
-(void) setBoxType:(NSBoxType)boxType
【返り値】 | |
| void | なし |
| 【パラメータ】 | |
| boxType | ボックスタイプ |
【解説】
ボックスのボックスタイプをセットします。
【NSBoxType】
● NSBoxPrimary 透明グレー
● NSBoxSecondary
● NSBoxSeparator グレー
● NSBoxOldStyle 線
【例文】
#import "MyObject.h"
@implementation MyObject
//myOutletÇÕNSBox
- ( IBAction )myAction:( id )sender
{
switch ([myOutlet boxType]){
case NSBoxPrimary:
NSLog( @"NSBoxPrimary" );
[myOutlet setBoxType:NSBoxSecondary];
break ;
case NSBoxSecondary:
NSLog( @"NSBoxSecondary" );
[myOutlet setBoxType:NSBoxSeparator];
break ;
case NSBoxSeparator:
NSLog( @"NSBoxSeparator" );
[myOutlet setBoxType:NSBoxOldStyle];
break ;
case NSBoxOldStyle:
NSLog( @"NSBoxOldStyle" );
[myOutlet setBoxType:NSBoxPrimary];
break ;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
case NSBoxCustom:
NSLog( @"NSBoxCustom" );
[myOutlet setBoxType:NSBoxCustom];
break ;
#endif
}
[myOutlet display];
}
@end
![]() | |
この記事を評価してください。
| Home 目次>ApplicationKit>NSBox | 修正日2007.12.12 |