kiprud
28 Jun 2010, 1:08 PM
Hi,
i've tried to put an image in a button with this code
Ext.setup({
icon: 'icon.png',
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
glossOnIcon: false,
onReady: function() {
var tabpanel = new Ext.TabPanel({
tabBar: {
dock: 'bottom',
layout: {pack: 'center'}
},
fullscreen: true,
ui: 'dark',
animation: {
type: 'cube',
cover: true
},
defaults: {scroll: 'vertical'},
items: [{
title: 'About',
html: '<h1>Bottom Tabs</h1>',
iconCls: 'info',
cls: 'card1'
}, {
title: 'User',
iconCls: 'user',
items:[
{
xtype: 'button',
//ui: 'action_round',
text: 'hehe',
cls:'x-btn-text-icon',
icon: 'essai.png'
}
]
}]
});
}
});
but image is never show, why ?
this is my head index.html declaration :
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Tabs 2</title>
<link rel="stylesheet" href="../../resources/css/ext-touch.css" type="text/css">
<script type="text/javascript" src="../../ext-touch-debug.js"></script>
<script type="text/javascript" src="index.js"></script>
<style type="text/css" media="screen">
body {
background-color: #333;
}
</style>
Can someone help me please ? Give me a sample code which show icon, image in button, please ...
Best regards.
i've tried to put an image in a button with this code
Ext.setup({
icon: 'icon.png',
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
glossOnIcon: false,
onReady: function() {
var tabpanel = new Ext.TabPanel({
tabBar: {
dock: 'bottom',
layout: {pack: 'center'}
},
fullscreen: true,
ui: 'dark',
animation: {
type: 'cube',
cover: true
},
defaults: {scroll: 'vertical'},
items: [{
title: 'About',
html: '<h1>Bottom Tabs</h1>',
iconCls: 'info',
cls: 'card1'
}, {
title: 'User',
iconCls: 'user',
items:[
{
xtype: 'button',
//ui: 'action_round',
text: 'hehe',
cls:'x-btn-text-icon',
icon: 'essai.png'
}
]
}]
});
}
});
but image is never show, why ?
this is my head index.html declaration :
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Tabs 2</title>
<link rel="stylesheet" href="../../resources/css/ext-touch.css" type="text/css">
<script type="text/javascript" src="../../ext-touch-debug.js"></script>
<script type="text/javascript" src="index.js"></script>
<style type="text/css" media="screen">
body {
background-color: #333;
}
</style>
Can someone help me please ? Give me a sample code which show icon, image in button, please ...
Best regards.