Can I use grouped objects as an icon button?

Klaus on-rev klaus at major.on-rev.com
Sat Mar 24 12:14:48 EDT 2012


Dag Willem,

Am 24.03.2012 um 17:05 schrieb William de Smet:

> Hi Richmond,
> 
> I should read my own question better :-)
> I meant button icon.
> 
> I know you can set an image as a button icon and that is what I do all
> the time. I use a card for all my images and call them with their ID
> in buttons.
> But with the resolution change for the new iPad and different screen
> sizes of Android systems I am looking for a way to 'easy' resize my
> button icons/images.

No you always need an image as an icon for buttons!
But you could create a snapshot of that group on the fly and use that as an icon!
...
lock screen
import snapshot from rect(the rect of grp "DRAW fake") of grp "DRAW fake"
put the id of last img into tNewIcon
hide last img
set the icon of btn "your button here..." to tNewIcon
unlock screen
...

> groeten,
> 
> William

Groetjes

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major.on-rev.com





More information about the use-livecode mailing list