cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create "Loading bar" widget?

Newbie

How to create "Loading bar" widget?

Hi,

In our case, we would like to create customize widget.

Is there any solution?

Many thanks,

niki_dong

pockey8328@gmail.come

Tags (2)
6 REPLIES 6

Re: How to create "Loading bar" widget?

There are descriptions, examples and API documents on how to create custom widgets in the Thingworx Help Center.

Latest version is found here...

http://support.ptc.com/cs/help/thingworx_hc/thingworx_6.5_hc/index.jspx?id=ThingWorxExtensibility&ac...

Re: How to create "Loading bar" widget?

Adding to Adam's response I would like to point a classic workflow that it's useful to follow when creating widgets:

1. First you need to identify an already existing JavaScript library that does the specific functionality for you. For example, if you want a Progress Bar, you search for "progress bar javascript library" on Google. One of the ones I found is: Progress.js - Themeable progress bar library

2. Wrap that library in your TW widget, using the documentation Adam provided.

Of course, it's quite obvious you can skip step 1, and write your own library, but what woould be the point if there are so many existing JS libraries out there?

Also take care about the licensing of those JS libraries (you need to check that license and act accordingly - not all JS libs are free for use)

Re: How to create "Loading bar" widget?

I tried to wrap a library in my TW widget, but I can't use it. Maybe I don't understand how to use it in TW environment. In an HTML file it's simple.


I declared the .js and the .css files on runtime in metadata.xml. I tried firstly to call a function from the JS library in afterRender but it didn't work.


Could someone please provide a concrete example ?

Re: How to create "Loading bar" widget?

Just i have also started to implements same custom widget "progress Bar".

Anyone can upload a step by step documents to implement it.

It will be helpful for me.

Thanks.

Re: How to create "Loading bar" widget?

Anybody got any luck with this? I am also struggling with the same.

Re: How to create "Loading bar" widget?

Actually for a progress bar, you can use Shape widget as it can be dynamically bound to it's fill Data value (EnableDynamicFill).