Ext.onReady( function() {
var colorShowId = '';
function showColor(id) {
colorShowId = id;
var colorText = Ext.getCmp(id);
colorWin.x = colorText.getPosition()[0] + colorText.getWidth();
colorWin.y = colorText.getPosition()[1];
colorWin.show();
}
var menu = new Ext.menu.ColorMenu({
listeners: {
select: function(picker, selColor) {
var color = '#' + selColor;
Ext.getDom(colorShowId).style.background = color;
colorWin.hide();
}
}
});
var colorWin = new Ext.Window( {
title : 'yyy',
constrain : true,
layout : 'fit',
plain : true,
width : 380,
height : 300,
closeAction : 'hide',
animCollapse : true,
animateTarget : Ext.getBody(),
modal : true,
items : [
{
xtype : 'button',
text : 'hzy',
menu : menu
}
]
}) ;
var form = new Ext.form.FormPanel({
width:200,
items : [
{
xtype : 'textfield',
id : 'aa',
fieldLabel : 'xxxxxx'
}
],
buttonAlign : 'center',
buttons: [{
text: 'xxx',
style:'background:red',
handler: function(btn) {
showColor('aa');
}
} ]
});
var viewport = new Ext.Viewport({
layout : 'fit',
items : [form]
});
viewport.doLayout();
});
- 大小: 6.8 KB
分享到:
相关推荐
一套完整的自定义的qmlGUI控件,功能强大完全可以拿去开发项目而不用重复造轮子。包括Button,Calendar,CheckBox,ComboBox,CtrlDialog,DateEdit,DatePicker,Dialog,FileDialog,ImageButton,Label,LineEdit...
textfield控件的实时监听
Swift 几个简单控件 以及 上传系统相册照片
自定义textfield
xcode5.0.2 ios7.0 storyboard中设置背景图片+多个textfield,
Flutter文本框TextField,是一个输入文本的控件,,,,
手工创建TextField,TextField的属性基本上上面都描述了,以及键盘的回调方法
ExtJs5 去掉textfield边框
8-22textfield8-22textfield8-22textfield8-22textfield
以前有许多人需要将 tree 的节点拖拽到其他控件中的问题,前段时间已经解决了,现在也将它的源代码贡献上来。 这个树的数据是静态的,没有做动态的,而且树节点的拖拽也没有做过多的处理,如果要知道怎么样做树...
TextField 自动换行
NULL 博文链接:https://xiaomy.iteye.com/blog/2280256
NULL 博文链接:https://salever.iteye.com/blog/719930
TextField-InputView, UITextField InputView模式:终结注册类、信息采集类
实现键盘的点击隐藏和解决textField被呼出键盘挡住的问题的简单代码
支持换行 空格 加粗 颜色 字号 字体 源码放送 用TextField实现
EXT表单验证之TextField,vtype 包括所有EXT中TextField的验证方式
ios-TextField自动换行.zip
让你对文本更了解,让你可以轻松的学习textfield;让你知道文本可以根据内容的大小改变其宽度和高度
Java中TextField类.pdf 学习资料 复习资料 教学资源