博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Sencha Mobile 简单应用
阅读量:6998 次
发布时间:2019-06-27

本文共 749 字,大约阅读时间需要 2 分钟。

类名:Button

创建方式

var btn=new Ext.Button();

常用属性

text:按钮上的文本

ui:按钮的呈现方式

width:宽度

height:高度

draggable:是否可拖拽

renderTo:渲染到哪去

handler:默认单击事件 

方法 

render:渲染到哪

on:添加事件

addListeners:添加事件 

 

简单应用:

Ext.setup({
    tabletStartupScreen: 
'
tablet_startup.png
'
,
    phoneStartupScreen: 
'
phone_startup.png
'
,
    icon: 
'
icon.png
'
,
    glossOnIcon: 
false
,
    onReady: 
function
() 
    {
    
         
//
创建一个button
        
var
 _btn
=
new
 Ext.Button({
            
//
renderTo:'dvcontent',//button.render('dvcontent');
            text:
'
一个可以点击的Button
'
,
            ui:
'
normal
'
,
//
'normal', 'back', 'round', 'action', 'forward'
            draggable:
true
,
//
拖拽
            width:
300
,
//
宽度
            handler:
function
(){
                Ext.Msg.alert(
'
谁让你点击我的!
'
);
            }
        
        });    
        
//
渲染到文档内    
        _btn.render(Ext.getBody());
    
    }});

     

转载于:https://www.cnblogs.com/loujady/archive/2011/03/17/1987316.html

你可能感兴趣的文章