tags:

views:

89

answers:

1

Actually I created a button using the cobogw widget library.

But the button does not look so good.

How can I override the default CSS file (cbg_button.css) supplied with the cobogw library.

A: 

From the ButtonCSS.gwt.xml file:

In case you want to integrate the css file in your own css or html file do the following:

  1. Copy the file org/cobogw/gwt/user/ButtonCSS.gwt.xml to your own project source directory and place it in exact the same directory structure as the original file.
  2. Remove the line <stylesheet src="cbg_button.css" />
  3. Copy the content of the cbg_button.css stylesheet into your own file.

To create a different look&feel for the css this page might help: http://cobogw.googlecode.com/svn/demo/WidgetsDemo.html#ButtonConfigurator

Hilbrand
Hi hibrannd i have org.cobogw.gwt-1.3.jar file ,but how can i create the file in this jar file and please tell me the extenstion of file than i need to create , and where i create the file (path of file) , whether it is in org/cobogw/gwt/user/ directory or outside
Tushar Ahirrao
Create the file mentioned in step 1 in your own project resource or src directory with the specified path. By creating this file with the same path and name as in the jar file the compiler will see your created file instead of the file in the jar file and if you remove the css file from your ButtonCSS.gwt.xml file the cbg_button.css file will not be generated in your project. From there your can create your own css version, or copy the content of the original cbg_button.css in your own css file and modify it or start with the ButtonConfigurator (see last link).
Hilbrand
as per your answer i created directory with a name org.cobogw.gwt.user in src folder of project , and i also created one file with name ButtonCSS.gwt.xml and i copy the content from original file ButtonCSS.gwt.xml that is located in jar file,and i remove the line <stylesheet src="cbg_button.css" /> when i run the program it gives me exeption i.e java.lang.NullPointerException at com.google.gwt.core.ext.linker.impl.StandardLinkerContext.<init>(StandardLinkerContext.java:164) at com.google.gwt.dev.HostedMode.link(HostedMode.java:452) at com.google.gwt.dev.HostedMode.doStartup(HostedMode.ja
Tushar Ahirrao
I've tested this with GWT version 1.7.1. Which version of GWT are you using. To be sure the right file is picked up also recompile and restart hosted mode.
Hilbrand
i also use same version GWT 1.7.1
Tushar Ahirrao