| Home 目次>ApplicationKit>NSMutableParagraphStyle | |
removeTabStop:
段落スタイルから、指定したタブと種類・場所が同じタブを取り除きます
-(void) removeTabStop:(NSTextTab *)tabStop
【返り値】 | |
| void | なし |
| 【パラメータ】 | |
| tabStop | タブストップ |
【解説】
段落スタイルから、指定したタブと種類・場所が同じタブを取り除きます。
【例文】
#import "MyObject.h"
@implementation MyObject
- ( IBAction )myAction:( id )sender
{
NSTextTab *tabStop1 = [[NSTextTab alloc] initWithType:NSLeftTabStopType
location: 10 ];
NSTextTab *tabStop2 = [[NSTextTab alloc] initWithType:NSLeftTabStopType
location: 20 ];
NSTextTab *tabStop3 = [[NSTextTab alloc] initWithType:NSLeftTabStopType
location: 30 ];
NSTextTab *tabStop4 = [[NSTextTab alloc] initWithType:NSLeftTabStopType
location: 20 ];
NSArray *arr = [NSArray arrayWithObjects:tabStop1,tabStop2, nil ];
NSMutableParagraphStyle *pStyle = [[NSMutableParagraphStyle alloc] init];
[pStyle setTabStops:arr];
NSLog([[pStyle tabStops] description]);
[pStyle addTabStop:tabStop3];
NSLog([[pStyle tabStops] description]);
[pStyle removeTabStop:tabStop4];
NSLog([[pStyle tabStops] description]);
}
@end
![]() | |
この記事を評価してください。
| Home 目次>ApplicationKit>NSMutableParagraphStyle | 修正日2006.12.26 |