button not redrawing w/ icon

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
berndg
Posts: 17
Joined: Thu Mar 22, 2012 3:37 pm

button not redrawing w/ icon

Post by berndg » Sat Mar 24, 2012 4:15 pm

Following an earlier inquiry (http://forums.runrev.com/viewtopic.php?f=7&t=11469), I can now cut a snapshot from a hidden image, apply the new image to the icon of a button, and apply some simple graphic effects to the snapshot.

I find that I can set the button's icon first, then apply the graphic filter to produce a high gloss effect. This shows the original snapshot on the button, without the gloss, but when I force a redraw by moving the mouse across the button, or one of many other UI operations, the button updates and it shows the shiny wonder.

How can I force a redraw from the script?

I searched the dictionary high and low but my choice of seemingly intuitive keywords (draw, refresh, redraw, update) lead to no insights.

Initially, I though I should apply the gloss effect first, then assign the glossy image to the button's icon. In this case, I found the button not showing the image at all, it is still in its usual gray.

What's going on here?

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: button not redrawing w/ icon

Post by Klaus » Sat Mar 24, 2012 5:18 pm

Hi Bernd,

hmm, I doubt if this is possible at all!

Just tried here, applied a graphic effect to an image and THEN set the icon of a button to the image.
NO effect, pure effect-less image in the button, no matter what I tried!?

Maybe you could apply the effect first, and then import another snapshot from the now "a/effected" image area?
A bit cumbersome, but worth a try :-)


Best

Klaus

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: button not redrawing w/ icon

Post by jacque » Sat Mar 24, 2012 7:25 pm

I had a terrible time with this in an app. The only thing that worked was to lock the screen and lock messages, go the next card, and go back. If you lock everything down like that it's very fast and seems to work.

The name of my handler was "doIDDance". ;)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply