NSBox:setTitlePosition:
Home 目次>ApplicationKit>NSBox このサイトはこちらに移転しました。

setTitlePosition:

タイトル位置をセットします


-(void) setTitlePosition:(NSTitlePosition)aPosition


【返り値】
   voidなし
【パラメータ】
   aPositionタイトルの位置
● NSNoTitle タイトル無し
● NSAboveTop 枠の外、左上
● NSAtTop 枠の上、左上
● NSBelowTop 枠の中、左上
● NSAboveBottom 枠の中、左下
● NSAtBottom 枠の上、左下
● NSBelowBottom 枠の外、左下


【解説】

タイトル位置をセットします。
大きさを調整し、再描画します。
初期設定の位置は、NSAtTop。



【例文】


#import "MyObject.h"

@implementation MyObject

- (
IBAction )myAction:( id )sender
{

switch ([myOutlet titlePosition]){
case NSNoTitle:
[myOutlet setTitlePosition:NSAboveTop];
[myOutlet setTitle:
@"NSAboveTop" ];
break ;
case NSAboveTop:
[myOutlet setTitlePosition:NSAtTop];
[myOutlet setTitle:
@"NSAtTop" ];
break ;
case NSAtTop:
[myOutlet setTitlePosition:NSBelowTop];
[myOutlet setTitle:
@"NSBelowTop" ];
break ;
case NSBelowTop:
[myOutlet setTitlePosition:NSAboveBottom];
[myOutlet setTitle:
@"NSAboveBottom" ];
break ;
case NSAboveBottom:
[myOutlet setTitlePosition:NSAtBottom];
[myOutlet setTitle:
@"NSAtBottom" ];
break ;
case NSAtBottom:
[myOutlet setTitlePosition:NSBelowBottom];
[myOutlet setTitle:
@"NSBelowBottom" ];
break ;
case NSBelowBottom:
[myOutlet setTitlePosition:NSNoTitle];
[myOutlet setTitle:
@"NSNoTitle" ];
break ;
}

}

@end


(C) 2000-2009 Satoshi Oomori.
[Apple]

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

この記事を評価してください。 

良い 

間違いがある 説明がわかりにくい 例文がわかりにくい  

Home 目次>ApplicationKit>NSBox
修正日2007.12.12