Problems with flexline-control


in my xml file, I use a flexline control inside a tree for setting the foreground colors and values dynamically.

The flexline consists of controls like


If I use the above mentioned code, some fields (those with a red font) are displayed with a dark background - although it is never set. If I set the background-color to white, nothing changes.

But the fgcolorprop is left or the font color is e.g. dark green, everything works alright.

Here an extract of the xml file:

			<rowtablearea2 griddataprop="treeNodes" rowcount="30" width="100%"
				height="100%" withborder="true" hscroll="true" vscroll="auto">
					<label name=" " width="300" asheadline="true"/>
					<label textid="status" width="50" asheadline="true"
					<flexline infoprop="headline"/>
					<label name="" asheadline="true"/>
					<str valueprop="selected">
						<treenode2 width="300" singleselect="true"
							imageprop="treeImage" withplusminus="true"/>
						<field valueprop="nothing" bgcolorprop="statusColor"
							width="50" noborder="true" displayonly="true"/>
						<flexline infoprop="/sectorline"/>

and of the adapter class:

            sectorBuffer.append("name;" + sectorName);

            m_Headline.addLabel(this, sectorBuffer.toString());
            m_Sectorline.addField(this, "valueprop;"
                + i
                + ";width;50;textalign;center;noborder;true;"
                + "displayonly;true;transparentbackground;true"
                + ";fgcolorprop;fg"
                + i
                + ";");

Thanks for advice…

H. Johannes

…we have an algorithm which decides if to take white or black as background color, so that the text is always visible. This algorithm is “stronger” then if you set the colour manually… this is the background of where the colour comes from.


Thanks for the answer.

It’s just a bit confusing if the background is set to transparent and the displayed colour is black…

So, I must use the bgcolorprop and pass on the transparent background :roll:

H. Johannes