How do you remove defaul GWT style from CaptionPanel widget?
Asked Answered
B

2

0

How do you remove defaul GWT style from CaptionPanel widget ?

In my .ui.xml I tried pretty much everything. I tried setting stylePrimaryName and styleName to my classname. I also tried defining .gwt-CaptionPanel with no effect.

My .xml looks something like this:

<ui:style src="../common.css">
    .test {
        color: red;
    }

    .gwt-CaptionPanel {

    }
</ui:style>

<g:CaptionPanel captionText="Test" stylePrimaryName="{style.test}">
</g:CaptionPanel>
Banquette answered 20/2, 2012 at 4:17 Comment(0)
S
2

CaptionPanel does not have a default style defined, so .gwt-CaptionPanel that you think exists, actually is not used. CaptionPanel is implemented as a <fieldset> tag so there should be no problem with the color text, but since you are not putting anything inside the caption panel you will not actually see anything.

Snowbound answered 20/2, 2012 at 5:23 Comment(0)
P
1

If you want to avoid issues for all controls you can open your AppName.gwt.xml and make sure you've commented out the default styles:

<inherits name='com.google.gwt.user.theme.standard.Standard'/> 
<inherits name='com.google.gwt.user.theme.chrome.Chrome'/> 
<inherits name='com.google.gwt.user.theme.dark.Dark'/>    
Pluralize answered 20/2, 2012 at 9:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.