Set icon of button to a graphic
Chipp Walters
chipp at chipp.com
Sun Jan 9 22:07:51 EST 2005
Hi Bill
You can try this. Creat a button and put this in the script:
on mouseUp
put the windowId of this stack into tWinID
put the rect of grc "redCircle" into tRect
import snapshot from rectangle tRect of window tWinID
set the name of last img to "redCircle"
end mouseUp
This will create an image from the graphic "redCircle" which you can now
use to create your buttons.
best,
Chipp
Bill Vlahos wrote:
> I want to show if an object is either too hot, too cold, or within
> normal temperature range? I was thinking that a simple circle filled
> with green, blue, or red with the temperature next or under it would be
> an easy way to tell at a glance if things are normal. I was thinking
> that if I create a button with the icon set to one of the 3 images and
> setting the label of the button to the temperature would do the trick. I
> would simply set the icon of the button to one of the three "colors".
>
> I created a 3 small circle graphics (one with each color) but I can't
> seem to select those for the button icon as they are a "graphic" not an
> "image".
>
> How can I convert a graphic to an image?
More information about the use-livecode
mailing list