This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

string value display
#1
hi,

How can I display a formatted string expression?

there is Only "Numeric value display". Bu i need "string value display". (250 byte string)
Reply
#2
Use Text input widget in read-only mode.
Reply
#3
Is it possible change the color of the text (read only option) from the value of an other boolean object ?
KNX Advanced Partner + Tutor
Reply
#4
You can do it same like this example.
https://forum.logicmachine.net/showthrea...2#pid40642
------------------------------
Ctrl+F5
Reply
#5
You don't need any scripts. Simply use Switch widget in read-only mode. Set Display mode to "Value", Shape to "No shape". Adjust On/Off state text and color as needed.
Reply
#6
(20.04.2026, 08:33)admin Wrote: You don't need any scripts. Simply use Switch widget in read-only mode. Set Display mode to "Value", Shape to "No shape". Adjust On/Off state text and color as needed.

Uhm....now I try (I have the main object from a 250byte string.....so the text change from the event)
KNX Advanced Partner + Tutor
Reply
#7
Then you need to use Custom JS. Change widget ID (46), listening address (0/0/1) and colors as needed.
Note that you need to switch to the User view for Custom JS to work.

Code:
Visu.on('widget-ready', 46, ({ widget }) => {
  const el = widget.getCompactModeEl()

  widget.listen('0/0/1', (value) => {
    el.style.color = value ? '#FF9900' : '#0099FF'
  })
})
Reply


Forum Jump: