[comp.sys.mac.hypercard] icon in a textfield

salter@magnus.acs.ohio-state.edu (John E Salter) (05/23/91)

Is it possible put an ICON in a scrolling field?  I small Icon thats
part of the text and scrolls with it.  Is their a font of ICONs?
.

aprile@ghost.unimi.it (Walter Aprile) (05/29/91)

salter@magnus.acs.ohio-state.edu (John E Salter) writes:


>Is it possible put an ICON in a scrolling field?  I small Icon thats
>part of the text and scrolls with it.  Is their a font of ICONs?
>.

If you dont't feel like using a special font (which I believe is the better solution) you should prepare yourself for some sweat work.

That's to say:   
1) you keep a list of all the ICON buttons you put in the field
2) every time the user scrolls the field you check what icons are now
invisible (that's to say, they scrolled up or down out of the field) and 
what icons are visible. Then you display the latter at the proper screen
location.

Remember, you have to keep a hidden description of button names ( or IDs), horizontal and vertical offsets.

Kludgy ? Yes, and slow. But it works: anyway, I think you will be better off by using a special font, with icons you like, intercepting the mouseUp and polling the clickedWord, Chunk or whatever.

Hope this will help,

Address is: aprile@ghost.unimi.it 

mouseup