what are formitem-> data-> Foreground color for? and how to set the color of the data programmatically? What is the name of the property?
![]()
what are formitem-> data-> Foreground color for? and how to set the color of the data programmatically? What is the name of the property?
![]()
Hi Strato,
Each of the attributes you see in the Attributes dialog, for all the UI elements and every UI object, has a corresponding "Name" which can be found on the related documentation page. For Fields, e.g., here is the page: https://www.lianja.com/doc/index.php/Field_Attributes
Hank
thank You Hank!
I couldn't solve the problem ... I need a little help. How can I color the data part of objects?
now this is how I try with appbuilder ...
... and program
Code:Lianja.get("teszt_oldal.section1.field25").setattribute("backcolor",rgb(170,255,127)) Lianja.get("teszt_oldal.section1.field25").setattribute("forecolor",rgb(255,0,0)) Lianja.get("teszt_oldal.section1.field25").setattribute("databackcolor",rgb(255,255,127)) Lianja.get("teszt_oldal.section1.field25").setattribute("dataforecolor",rgb(255,0,255))
It’s a color string e.g. 'red' or '#FF0000' where #RRGGBB are hex values.
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
the situation is the same. Although the rgb colors and the HTML colors are slightly different, both solutions work (as described in doc). For Caption, both foreground and background coloring are fine, but data coloring fails. The data background color is displayed, but not in the expected area.
Code:Lianja.get("teszt_oldal.section1.field25").setattribute("backcolor",rgb(170,255,127)) Lianja.get("teszt_oldal.section1.field25").setattribute("forecolor",rgb(255,0,0)) Lianja.get("teszt_oldal.section1.field25").setattribute("databackcolor",rgb(255,255,127)) Lianja.get("teszt_oldal.section1.field25").setattribute("dataforecolor",rgb(255,0,255)) Lianja.get("teszt_oldal.section1.box").setattribute("backcolor","#AAFF0F") Lianja.get("teszt_oldal.section1.box").setattribute("forecolor","#FF0000") Lianja.get("teszt_oldal.section1.box").setattribute("databackcolor","#FFFF0F") Lianja.get("teszt_oldal.section1.box").setattribute("dataforecolor","#FF00FF")
Hi guys
Looking to change some of the colours on the web interface programatically. We want to change foreground and background in a field on a form section and button text on a canvas section but cannot seem to get the syntax right.
For the button we have tried
Lianja.get("pcust.welcome.cmdLogin").setattribute( "foreColor",rgb(255,0,0));
Lianja.get("pcust.welcome.cmdLogin").setattribute( "foreColor",RGB(255,0,0));
Lianja.get("pcust.welcome.cmdLogin").setattribute( "foreColor","red");
Lianja.get("pcust.welcome.cmdLogin").foreColor = "red";
Lianja.get("pcust.welcome.cmdLogin").foreColor = '#FF0000';
*************************************
On the field, we want the change to be permanent but every time we change it in App Builder it keeps changing back. Is this maybe a CSS issue?
Thanks in advance
Simon
In a web app on a form section one can cheat <s>:
cmdLogin.forecolor = "red"
Otherwise, what works for me is:
var loSection = Lianja.get("pcust.welcome");
loSection.cmdLogin.forecolor = "red";
Hank
Hi Hank
Thank for the reply
Have tried that but nothing happens on the browser and always get a browser error.
Uncaught TypeError: Cannot set properties of undefined (setting 'forecolor')
We have tried - forecolor, foreColor (as per docs), Forecolor, ForeColor just in case the case sensitivity is an issue but always the same browser error message.
Any other thoughts?
Thanks in advance
Simon
This is code from a working app:
Code:btndetails.forecolor = "white";
Bookmarks