FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
05-09-2022 11:07 PM - last edited on 09-12-2022 04:35 PM by HmiGuide
Is there a method of editing an existing WebIQ widget, rather than creating a custom widget from a blank template?
For example, I would like to add some event handling to a flex layout container. Can I create a custom widget using the existing widget as a starting point? I would like to keep the configuration options in the WebIQ Designer.
Solved! Go to Solution.
05-10-2022 01:17 PM
What kind of event handling are you trying to implement? Maybe there's an easier or better way to achieve it.
05-10-2022 02:38 PM
I am trying to develop a library of custom widgets, so I'd like to understand this in depth rather than find a solution to this specific example.
For this example, lets say swipe events. I accomplished this using a local script but I'd like to package this code within the widget itself for ease of implementation.
01-16-2023 08:37 AM
Is this still an issue or can this topic be closed?
01-16-2023 03:07 PM
Someone correct me if I'm wrong, but it seems that the bundled widget source code is contained in the project workspace/js/controls-bundle.js file. Individual widget source code is unavailable.
01-17-2023 08:24 AM
That's only partly true. A widget consist of HTML, JavaScript, CSS (LESS) code and maybe some images like icons etc.
These are distributed amongst the corresponding directory inside the HMI project (e.g. pics/system/controls/alarm-history contains the icons for the Alarm List widget). Only the JavaScript code of all WebIQ widgets is bundled inside the controls-bundle.js file.
01-17-2023 03:10 PM
I'll accept this answer as the current solution. As a recommendation, it would be nice if widget source code (including html,css, icons etc.) could be downloaded and modified from WebIQ Designer.
01-17-2023 03:18 PM
We can provide these files on request, however we discourage using our widgets as a base and creating derivatives normally because that way you will not benefit from possible bug fixes in the future.
That's why we're not offering them publically as most of the time CSS changes are sufficient to change widgets for most customers and should be used instead.