Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread simple example of animating a TIcon..
Thu, Sep 6 2018 6:33 PMPermanent Link

R&D team @ Environment Canada

Good day

I'm not sure why I'm having trouble with this, but I'm trying to get a TIcon to 'rotate'.. it seems this can be done with the 'icon' properties (of TIcon).. but I've yet to get that to work

Anyone can provide a simple example?

(I'm aware of the thread on TSpinner, but I gather this is not required to get a 'spinner')

thanks.. Bruno
Fri, Sep 7 2018 3:57 AMPermanent Link

Uli Becker

Hi Bruno,

> Anyone can provide a simple example?

Maybe there is a better way meanwhile (I haven't used animated icons for
a while) but here is how I do it:

Have a look here:

http://preloaders.net/en/circular

You can change all settings (speed included) and export it as sprites.
Then just load the sprite image into a TAnimatedIcon component. Don't
forget to set the "direction" property.

Also this might be interesting:

https://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_general&page=1&msg=8771#8771

I attaced a small sample project with some animated flags using sprites.

Hope that helps.

Uli








Attachments: Test Animated Icon.zip
Fri, Sep 7 2018 4:45 PMPermanent Link

Bruno Larochelle

super, thanks Uli, your example works perfectly, and the resource for sprites will be useful

regards.. Bruno

//////////////

Uli Becker wrote:

Hi Bruno,

> Anyone can provide a simple example?

Maybe there is a better way meanwhile (I haven't used animated icons for
a while) but here is how I do it:

Have a look here:

http://preloaders.net/en/circular

You can change all settings (speed included) and export it as sprites.
Then just load the sprite image into a TAnimatedIcon component. Don't
forget to set the "direction" property.

Also this might be interesting:

https://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_general&page=1&msg=8771#8771

I attaced a small sample project with some animated flags using sprites.

Hope that helps.

Uli
Fri, Sep 7 2018 6:11 PMPermanent Link

Bruno Larochelle

For others who need this.. I should add that when adding an icon to the icon library for this purpose.. you must
expand the ApplyProperties property, and make sure that Background=true, otherwise you won't see your icon!

.. Bruno

////////////

Bruno Larochelle wrote:

super, thanks Uli, your example works perfectly, and the resource for sprites will be useful

regards.. Bruno

//////////////

Uli Becker wrote:

Hi Bruno,

> Anyone can provide a simple example?

Maybe there is a better way meanwhile (I haven't used animated icons for
a while) but here is how I do it:

Have a look here:

http://preloaders.net/en/circular

You can change all settings (speed included) and export it as sprites.
Then just load the sprite image into a TAnimatedIcon component. Don't
forget to set the "direction" property.

Also this might be interesting:

https://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_general&page=1&msg=8771#8771

I attaced a small sample project with some animated flags using sprites.

Hope that helps.

Uli
Wed, Sep 12 2018 11:52 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Bruno,

<< I'm not sure why I'm having trouble with this, but I'm trying to get a TIcon to 'rotate'.. it seems this can be done with the 'icon' properties (of TIcon).. but I've yet to get that to work

Anyone can provide a simple example? >>

In the ControlsDemo project that ships with EWB, check out the first page, specifically Button1 under "Buttons and Indicators".  It shows how to set up a button so that when you click on it, it rotates the icon.  You would do the same for the TIcon control.

The key properties is the TIcon.Icon.Animation property, combined with the TIcon.Icon.StartAnimation/TIcon.Icon.StopAnimation methods.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Sep 12 2018 4:05 PMPermanent Link

R&D team @ Environment Canada

thanks Tim

I could not ever find that demo (I did 'install' the demos, shipped with 2.06b11).

No matter though. It's super easy -- it can't be any easier!

.. Bruno


/////////


Tim Young [Elevate Software] wrote:

Bruno,

<< I'm not sure why I'm having trouble with this, but I'm trying to get a TIcon to 'rotate'.. it seems this can be done with the 'icon' properties (of TIcon).. but I've yet to get that to work

Anyone can provide a simple example? >>

In the ControlsDemo project that ships with EWB, check out the first page, specifically Button1 under "Buttons and Indicators".  It shows how to set up a button so that when you click on it, it rotates the icon.  You would do the same for the TIcon control.

The key properties is the TIcon.Icon.Animation property, combined with the TIcon.Icon.StartAnimation/TIcon.Icon.StopAnimation methods.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Sep 13 2018 3:19 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Bruno,

<< I could not ever find that demo (I did 'install' the demos, shipped with 2.06b11). >>

Sorry, my fault - I forgot that I didn't include that with the examples because of the size of some of the external files used in the project.

I will get it uploaded to the support forums today.

Tim Young
Elevate Software
www.elevatesoft.com
Image