tags:

views:

444

answers:

2

hi,

I'm using PopupManager to display (not modal) popups in Flex.

How can I make the background of my TitleWindow popup completely transparent? Now it is semi-transparent.. see picture with semi-transparent background (i.e. I just want the label inside visible):

http://dl.dropbox.com/u/72686/semiTransparent.png

Maybe, instead of making it transparent I could try to reduce the padding, in order to make only the children visible ?

thanks

A: 

Set the backgroundAlpha style of the TitleWindow to 0.

Edit, oops, my mistake, since it's a subclass of Panel, you'll also need to set the borderAlpha style to 0 as well. If you're using the default flex skins, the white arrow is the "background" and the blue area is the "border".

quoo
If this is what you mean: <mx:TitleWindow ... backgroundAlpha="0"> it didn't work.
Patrick
My bad, corrected.
quoo
ok cool, now I only have a white background. One more step: I need to remove the padding between the border and the first children. See the new picture: http://dl.dropbox.com/u/72686/caption2.png
Patrick
in other terms, I want to remove left and right space and completely fit the content to the window
Patrick
sorry, top and bottom space as well
Patrick
That's the borderThicknessBottom, borderThicknessLeft, borderThicknessRight, and borderThicknessTop styles, which are all listed in the TitleWindow api reference linked in my original answer.
quoo
A: 

If you want to make it transparent, add

borderAlpha="0.0"

If you also want to remove the side and bottom borders completely, add

borderThicknessLeft="0" borderThicknessRight="0"

You can't remove the header, even thought there is borderThicknessTop option.
Also, the borderThickness="0" option doesn't work as far as I know.

modz0r
thanks for reply. Oh this is a pity. I really cannot remove the header from my captions ? It is quite a lot of space. Can I only include text in the header ?
Patrick
As far as I know, you can't modify/remove the header.. only change it's color and transparency.If you really want a text box with no border, you can make a new component that contains text field only (and an OK button), and instead of calling the Alert.show, use the PopUpManager to call it.But that means you'll need to control the resizing of the box every time you'll call it.
modz0r
I'm actually already using PopUpManager, and not using Alert.show. And I'm loading a TitleWindow. Should I load a custom component instead of TitleWindow ? thanks
Patrick
Doh. For some reason while I wrote this comment I forgot that we were talking about a popup :) Anyhow, it should work. When I started playing with the PopUpManager I made a DataGrid component and call it, just to see if it works, and it did. No reason why calling a text field shouldn't work, although I don't know if you'll lose some window abilities for doing so.
modz0r