Path: utzoo!attcan!uunet!peregrine!zardoz!hodge!pnet06!mark From: mark@pnet06.cts.com (Mark Murphy) Newsgroups: comp.sys.mac.hypercard Subject: Re: non-text in a field Message-ID: <1845@hodge.UUCP> Date: 11 Aug 88 20:30:35 GMT Sender: rusty@hodge.UUCP Organization: People-Net [pnet06], Orange, CA Lines: 41 wb1j+@andrew.cmu.edu (William M. Bumgarner) writes: >>> Is is possible to enter non-text into a field? Specifically, I >>> wish to put some sort of Macpaint picture or an icon into a field then >>> maybe delete it from a field and move it to another. > >No can do. Fields canonly contain 29,997 characters of text of >only one font/size/style. > >Your best bet is to define a region on the card as being your picture area >[This is completely for the sake of ease of scripting], and then use doMenu >copy and doMenu paste picture to copy/paste pictures in and out of the region. >Be careful when pasting-- Hypercard has a Paste Picture/Paste Text menu option >depending on the type of the clipboard..... if you do the wrong one at the >wrong time (paste text when the clip holds a picture), your script will die >with a 'menu option not found' error. I ran into this and fixed it by writing >an XFCN that checks the type of the clipboard. > >b.bum >wb1j+@andrew.cmu.edu Actually, it is possible to have picture like objects or icons within fields and buttons. Since fonts are nothing more than bit images, take the picture or icon you want and create a font (let's call it pictFont). All that is needed now is to move pictFont into your system, hypercard, home card, or stack. Then create a new field with the pictFont as the font. Choose the font size you created the pictFont in, and use the plain style. This will yeild a picture where the black pixels are drawn and the white pixels are transparent. With this basic concept in mind, try to do some nifty tricks such as changing font styles, sizes, etc. If you want the black and white pixels to be drawn, there are several tricks that must be done. One of the users at our HyperCard SIG inverted his picture, then put it into a font. Once used in HC, he set the style of his font to outline. This inverted the already inverted picture to yield a positive result. It is difficult to explain within this post, but I think you may get the general idea. Hope this helps.... Mark Murphy, Tyrell Co. UUCP: {crash uunet}!pnet06!mark Voice: (714) 491-8110 ARPA: crash!pnet06!mark@nosc.mil The Desktop BBS: (714) 491-1003 INET: mark@pnet06.cts.com