开发者

Print clipping (TextField) occuring during NSPrintOperation

Does anyone know how to force an application to wrap the text so it will fit on a printed page? I have a resizable text field in a scroll view and if the user resizes it past a certain width, the print preview just cuts the text to the right completely off. Here's my code on .m:

    - (NSPrintOperation *)printOperationWithSettings:(NSDictionary *)ps error:(NSError **)e;
{
    NSPrintInfo *printInfo = [self printInfo];
    开发者_StackOverflow社区NSPrintOperation *printOp = [NSPrintOperation printOperationWithView:myView
                                                               printInfo:printInfo];
    return printOp;
}

then i just specified 'myView' in IB as my scrollview. Anything i can do?


Have you looked into the documentation of the object you're using? NSPrintInfo is configurable. Further, scroll views don't wrap text. Only text views and text fields. Asking a scroll view to print is a bit strange as well. You're askin' the wrong guy, in other words. :-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜