开发者

smartgwt - make window background transparent / no color

开发者 https://www.devze.com 2023-01-25 08:37 出处:网络
we\'ve tried to make the background of a smartgwt window transparent with no success :/ setting a transparent image as backgroundimage yields nor directly setting a custom style class with a transpare

we've tried to make the background of a smartgwt window transparent with no success :/ setting a transparent image as backgroundimage yields nor directly setting a custom style class with a transparent background setting yields no开发者_JS百科 success.

is there any possibility to change the default background color : #ffffff or rgb(255,255,255) to transparent?

thank you in advance, dave


I think #setOpacity(int) should do the trick... Also see #setDragOpacity(int).


I think I read that this would be a feature of the new Java JDK 7. So if you can't find an answer that might be the problem. I'm not positive though. Good Luck


I've found solution in [Showcase] - [Forms] - [Custom Picker] (SmartGWT 2.2):

Try to use code like this:

    dialog = new Dialog();
    dialog.setIsModal(true);  
    dialog.setShowModalMask(true);
    dialog.setShowHeader(false);  
    dialog.setShowEdges(false);
    dialog.setEdgeSize(10);
    dialog.setWidth(980);
    dialog.setHeight(700);  
    dialog.setShowToolbar(false);
    dialog.centerInPage();

I think this line disables background - setShowEdges(false).


Did you try #setBackgroundColor("transparent") ?

E.g.:

Window window = new Window();
window.setBackgroundColor("transparent");

Worked for me...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号