CSS在GXT中不起作用

CSS在GXT中不起作用

本文介绍了CSS在GXT中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习GWT GXT阶段,



我的项目中一些css工作正常,但有些向我展示了一种奇怪的行为。



登录按钮。

  logonBtn = new TextButton(Connect); 
logonBtn.setIconAlign(IconAlign.RIGHT);
logonBtn.setIcon(Resources.INSTANCE.login());
logonBtn.setStyleName(Project-Button);



Css

  .Project-Button {
颜色:黑色;
border:瘦首#FF6600;
font-family:新快报,世纪哥特,Times New Roman,Verdana,Arial;
vertical-align:middle;
background-position:left center;
背景颜色:白色;
光标:指针;
}

但是当我运行这个项目时,这个css并没有对连接显示任何影响按钮。



在我的项目中,我有6或7个TextButton。
但是这个CSS仅在其中一个按钮中显示效果。



我试图用Firebug来查看问题。我看到没有这个textButton附带的Project-Button css。



附加的是fireBug的图片。



如果有人理解这一点,请解释并给出解决方案。



感谢您的提前。



解决方案

如果tou改变GXT文本按钮样式,你必须编写你的ButtonCellAppereance。 GXT按钮样式与其他gxt小部件相比过于复杂。



:开始了gwt项目项目



但我没有更多的时间来发展。好的黑客...

I am in learning phase of GWT GXT,

I my project some of the css are working fine , but some are showing me a strange behavior .

for login button.

logonBtn = new TextButton("Connect");
        logonBtn.setIconAlign(IconAlign.RIGHT);
        logonBtn.setIcon(Resources.INSTANCE.login());
        logonBtn.setStyleName("Project-Button");

Css

.Project-Button {
    color: Black;
    border: thin outset #FF6600;
    font-family: Courier New, Century Gothic, Times New Roman, Verdana, Arial;
    vertical-align: middle;
    background-position: left center;
    background-color: White;
    cursor: pointer;
}

But when i run the project , this css is not showing any effect on connect button.

In my Project i have i have 6 or 7 TextButton.But this css is showing effect in only one of these buttons

I tried to use Firebug to see the problem. I see there is no Project-Button css attached with this textButton.

Attached is the Image of fireBug.

If somebody understand this , please explain and give the solution.

Thanks in Advance.

解决方案

If tou change GXT Text button style you have to write your ButtonCellAppereance. GXT button styles too complex as other gxt widgets. example link about appereance

1: http://www.slideshare.net/senchainc/ext-gwt-30-theming-and-appearances i started a project on gwt projects as theme project link

but i have no more time to develop. good hacking...

这篇关于CSS在GXT中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 18:45