You are not logged in.
Pages: 1
Topic closed
Hello again,
Is there a possibility to create a custom button?
I would like to use my own svg graphics file as a button - when I click on it, it will temporary change a CNB element value.
Hubert
Offline
Hello Hubert,
yes, there is possibility to create your own custom components, however it requires some knowledge of JavaScript.
Try to go through example "0301-10 Custom HMI Component" and modify it to act as a button with desired behaviour.
Core of the JavaScript will contain following code:
REX.UI.SVG.CustomButton = function(svgElem, args) {
// Inherit from base component
var that = new REX.UI.SVG.HTMLComponent(svgElem, args);
var button = $(document.createElement('button'));
$(that.div).append(button);
return that;
};
Other functionality is up to you.
Hope it helps.
Regards, Tomas
Offline
This 'old' post should be already a big help :
Offline
Pages: 1
Topic closed