Skip to main content
1-Visitor
December 9, 2015
Question

How to create "Loading bar" widget?

  • December 9, 2015
  • 2 replies
  • 4498 views

Hi,

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

Is there any solution?

Many thanks,

niki_dong

pockey8328@gmail.come

2 replies

14-Alexandrite
December 9, 2015

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&action=show

19-Tanzanite
December 10, 2015

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)

1-Visitor
January 18, 2016

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 ?

1-Visitor
May 4, 2017

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.