Thread View: comp.sys.next.programmer
2 messages
2 total messages
Started by Jake
Tue, 14 Apr 1992 03:05
Problem with graphics in Textobject
Author: Jake
Date: Tue, 14 Apr 1992 03:05
Date: Tue, 14 Apr 1992 03:05
22 lines
1372 bytes
1372 bytes
Hi all. I've got a strange sort of problem, although I think I know the solution, I don't know how to implement it. I'm using Jayson Adams technique for putting graphics in a Text object (ie: //select the sel I want// newImage = [[NXImage alloc] initFromFile:[openPanel filename]]; newGraphic = [[GraphicImage alloc] initForImage:newImage]; [[dmCardFace docView] setMonoFont:NO]; [[dmCardFace docView] replaceSelWithCell:newGraphic]; My only problem is that when I have the imported image on the same line as some text, where the picture goes past the right side of the view, the picture appears double- once on the line with the text on it, once on the line below it. If I delete one image they both disappear. It seems to me that there needs to be somekind of update to move the picture to the next line... does anyone have any ideas how? Thanks a lot, Jake EMAIL: sunthej@alleg.edu
Re: Problem with graphics in Textobject
Author: Dick Phillips
Date: Tue, 14 Apr 1992 15:44
Date: Tue, 14 Apr 1992 15:44
30 lines
1607 bytes
1607 bytes
In article <1992Apr14.030523.21437@pellns.alleg.edu> sunthej@alleg.edu (Jake) writes: > Hi all. > I've got a strange sort of problem, although I think I know the solution, > I don't know how to implement it. I'm using Jayson Adams technique for > putting graphics in a Text object (ie: > > //select the sel I want// > newImage = [[NXImage alloc] initFromFile:[openPanel filename]]; > newGraphic = [[GraphicImage alloc] initForImage:newImage]; > [[dmCardFace docView] setMonoFont:NO]; > [[dmCardFace docView] replaceSelWithCell:newGraphic]; > > My only problem is that when I have the imported image on the same line as > some text, where the picture goes past the right side of the view, the > picture appears double- once on the line with the text on it, once on the > line below it. If I delete one image they both disappear. > > It seems to me that there needs to be somekind of update to move the > picture to the next line... does anyone have any ideas how? > > Thanks a lot, > Jake > EMAIL: sunthej@alleg.edu You can eliminate this behavior with one statement: [[dmCardFace docView] setCharWrap:NO]; Dick Phillips
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads