Toolbar buttons, CSS, mouseover weirdness - Ext JS

I have a toolbar with icon-only buttons. This was working with version .4, but breaks in mysterious ways with Ext 1.0alpha2. I have made several changes to my CSS and got it from totally messed up to not bad (see http://www.yui-ext.com/forum/viewtopic.php?t=2832), but there are still two problems:

1) The icons are a couple of pixels too high on the toolbar.

2) On mouseover, the icon gets replaced by what should be a background image.

Here's the bar - normal on top, mouseover below:



For problem 1, I have tried putting margin-top: 2px or padding-top: 2px on the button CSS in several places. The ones that do anything at all cause the toolbar itself to get some strange padding. I can't figure out what to change in the CSS to move the icons down 2 pixels without messing up something else.

For problem 2, the button is defined as (example):

tb.addButton({
   tooltip: 'Next object',
   cls: 'x-btn-icon next-btn',
   handler: this.nextObject,
   scope: this});
and the CSS is:

.next-btn {
	background-image: url('../images/next.gif');
}

.x-item-disabled .next-btn {
	background-image: url('../images/next-cold.gif');
}
I have traced the problem as far as the CSS in ext-all.css for the mouseover:

.x-toolbar .x-btn-over .x-btn-left{
	background:url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 0;
}
.x-toolbar .x-btn-over .x-btn-right{
	background:url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -21px;
}
.x-toolbar .x-btn-over .x-btn-center{
	background:url(../images/default/toolbar/tb-btn-sprite.gif) repeat-x 0 -42px;
}
Remove those lines, and there is no mouseover action. Which is not what I want - I just want my icon on top of the nice rectangle on mouseover. It appears that the background image in the ext-all CSS is overlaying my background image.

I have been fighting with this for 3 hours and I can't figure it out. Help!
__________________
David Badke
Humanities Computing and Media Centre
University of Victoria, BC, Canada
Reply With Quote
  # 2  
Old 03-06-2007, 05:45 AM
Default

Old:

.next-btn {
   background-image: url('../images/next.gif');
}

New:

.next-btn .x-btn-text {
   background-image: url('../images/next.gif');
}
Reply With Quote
  # 3  
Old 03-06-2007, 10:34 AM
Default

Thanks! That works perfectly.
__________________
David Badke
Humanities Computing and Media Centre
University of Victoria, BC, Canada
Reply With Quote
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
是的,vform2 的 form-designer 文件夹中包含了 form-widget、toolbar-panel、setting-panel、widget-panel、designer.js、index.vue、refMixinDesign.js 等文件和文件夹,这些文件和文件夹中包含了表单设计器的不同组件和代码逻辑。 下面是这些文件和文件夹的简要说明: 1. **form-widget**:该文件夹包含了表单设计器中使用的一些表单控件组件,例如文本框、下拉框、单选框、复选框等。这些组件是表单设计器的核心部分,用于定义表单控件的类型、属性和行为。 2. **toolbar-panel**:该文件夹包含了表单设计器中使用的工具栏组件,例如添加控件、删除控件、保存表单等。这些组件是用来辅助开发者构建表单界面的工具。 3. **setting-panel**:该文件夹包含了表单设计器中使用的设置面板组件,用于设置表单设计器的一些属性,例如表单名称、表单描述等。 4. **widget-panel**:该文件夹包含了表单设计器中使用的控件面板组件,用于展示可用的表单控件列表。 5. **designer.js**:该文件是表单设计器的核心代码文件,用于实现表单设计器的主要逻辑,例如表单控件的增删改查、表单数据的生成和保存等。 6. **index.vue**:该文件是表单设计器的入口文件,用于实现表单设计器的界面布局和组件调用。 7. **refMixinDesign.js**:该文件是一个 Vue.js 的 mixin,用于扩展表单设计器的功能。例如,它提供了控件属性编辑框的弹出显示、属性修改等功能。 总之,vform2 的 form-designer 文件夹中包含了 form-widget、toolbar-panel、setting-panel、widget-panel、designer.js、index.vue、refMixinDesign.js 等文件和文件夹,这些文件和文件夹中包含了表单设计器的不同组件和代码逻辑,用于支持开发者创建复杂的表单界面。开发者可以根据需要进行修改和定制,从而实现自定义的表单设计器。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值