# Problems with flexline-control

**URL:** <https://techcommunity.softwareag.com/t/problems-with-flexline-control/57374>\
**Category:** Forum\
**Tags:** Former-Crossvision-Products, Application-Composer\
**Created:** [June 13, 2006, 7:17pm UTC](https://techcommunity.softwareag.com/t/problems-with-flexline-control/57374 "2006-06-13T19:17:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hjo](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@hjo](https://techcommunity.softwareag.com/u/hjo)\
**Post date:** [June 13, 2006, 7:17pm UTC](https://techcommunity.softwareag.com/t/problems-with-flexline-control/57374/1 "2006-06-13T19:17:17Z")

</div>

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

```auto
(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:

```auto

			<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:

```auto
            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

---

<div class="post-metadata">

**Author:** ![Bjoern\_Mueller](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@Bjoern\_Mueller](https://techcommunity.softwareag.com/u/Bjoern_Mueller)\
**Post date:** [June 26, 2006, 10:25pm UTC](https://techcommunity.softwareag.com/t/problems-with-flexline-control/57374/2 "2006-06-26T22:25:42Z")

</div>

…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

---

<div class="post-metadata">

**Author:** ![hjo](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@hjo](https://techcommunity.softwareag.com/u/hjo)\
**Post date:** [June 27, 2006, 1:50pm UTC](https://techcommunity.softwareag.com/t/problems-with-flexline-control/57374/3 "2006-06-27T13:50:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:38pm UTC](https://techcommunity.softwareag.com/t/problems-with-flexline-control/57374/4 "2021-04-02T14:38:35Z")

</div>


