Portals, HTML fields, transparancy and backgroundcolors

Today I used some HTML fields in a portal (thanks for the tip Johan :D ).

While the background of the field is colored and the field is checked transparent the background becomes white.

I noticed when I set/change the margins, that the background under the margin has the right color/transparancy.

My conclusion is that the field still has it’s transparancy set but that the html doesn’t allow/give transparant behaviour and makes the field white. Strange thing is that the white color doesn’t disappear right after the text but at the end of the field.

You could say that I have to set the <bgcolor=“blabla”> but that isn’t possible since I don’t use websavvy webcolors for the portals…

BTW setting the bgcolor does make the background end at the end of the text and the rest is transpararent again?!

Can you post me a image of what you exactly see?
And what portion of the field is OK and not?

This is it. If you look closely you will see that the 2 pixel margin I defined is transparent/right color…

Where are those 2 pixels.
But i think we can do nothing about it. Because i think that when you display html then the html area is completely responsible for what you see and i think that component will not be transparant then.

I will check this out (for example will a html area where you display some html be transparant when you say it should?)

Johan, the margins are at the left and top.

I can follow your thought pattern however and I could agree 100% if the white background would end right after the last character (like it does when I do define a background). In this case the white background goes on until the end of the field and that seems strange to me…

FYI

the bgcolor width/height of your text can be set using

TEST

In this case your bgcolor will have a fixed width of 200
despite the fact that the width of “TEXT” is much smaller.

Thanks Maarten, I could use this to change the background but then the only issue left is the fact that my portal has a very light shaded color. Lighter than I can define with websave colors. Or is there another way?

Hi Marcel,

I’ve read this thread a couple of times but it’s not really clear to me what you’re trying to achieve :oops: sorry.

Looking at your screenshot, could you describe what the end result should be? Maybe I can give you a tip based on that.

OK maarten, no sweat. I am not always able to write down what I think/want. Sorry.

In the end I want a red/green/whatever foreground colour based on the status of (in this case) an order.

Since I can’t trigger the foreground event of a field because this will trigger the complete column in the portal Johan advised to use html. So this is what I do here.

The downside however is that the background is white while it should be transparent.

Am I clear enough now?

aha.

  1. create an unstored calc in your child table that does something like:
    if(myStatus==“closed”)
    {
    return ‘Closed’
    }
    else
    {
    etc…
    }
  2. go to your portal and place a label in your portal.
    (don’t forget to highlight your portal, before you create the label)
    3)set the dataprovider-property of this label with the unstored calc you just created in the child table
    ex: relationOfMyPortal.myUnstoredCalc
  3. set the Label to transparent

That should do it.

Maarten, you just made my day!!!

Thanks, I love it.

And now back to real life :D

Normally I use the ‘text’ property to ‘name’ the column. In case I use a label this is not possible?! Or do I make a mistake here.

Anyway, how do I do that now?

:oops: Got it. Instead of the use of the ‘text’ property I have to use the ‘name’ property here…