Problems with flexline-control

Hello,

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

(CONTROL;field;)valueprop;0;width;50;textalign;center;noborder;true;displayonly;true;transparentbackground;true;fgcolorprop;fg0;

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">
				<tr>
					<label name=" " width="300" asheadline="true"/>
					<label textid="status" width="50" asheadline="true"
						textalign="center"/>
					<flexline infoprop="headline"/>
					<label name="" asheadline="true"/>
				</tr>
				<repeat>
					<str valueprop="selected">
						<treenode2 width="300" singleselect="true"
							imageendnode="/images/fileendnode.gif"
							imageprop="treeImage" withplusminus="true"/>
						<field valueprop="nothing" bgcolorprop="statusColor"
							width="50" noborder="true" displayonly="true"/>
						<flexline infoprop="/sectorline"/>
						<hdist/>
					</str>
				</repeat>
			</rowtablearea2>

and of the adapter class:

            sectorBuffer.append("name;" + sectorName);
            sectorBuffer.append(";width;50;asheadline;true;textalign;center");

            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…

Greetz,
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.

Bjoern

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