1. #1
    Banned
    Join Date
    Jan 2008
    Posts
    11
    Vote Rating
    0
    kiprud is on a distinguished road

      0  

    Question Icon in button

    Icon in button


    Hi,
    i've tried to put an image in a button with this code
    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 :
    Code:
        <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.

  2. #2
    Sencha User
    Join Date
    Jun 2010
    Posts
    10
    Vote Rating
    0
    GermanGuy is on a distinguished road

      0  

    Default


    Hi,
    ..same here, was using about the same code as kiprud, is there anything wrong about the code maybe ?
    Any directions would be very much appreciated,
    thanks so much,
    Frank

  3. #3
    Sencha Premium Member
    Join Date
    Sep 2009
    Posts
    35
    Vote Rating
    5
    Aldri is on a distinguished road

      0  

    Default


    Same problem here, i can't figure out how to show my image on the button, is it bugged ?
    I've tried with the options icon and iconCls without success

  4. #4
    Sencha Premium Member
    Join Date
    Sep 2009
    Posts
    35
    Vote Rating
    5
    Aldri is on a distinguished road

      0  

    Default


    Ok i found a way to add an icon to my button:
    Code:
    var button_test = new Ext.Button({
         width: 40,
         height: 40
    });
    button_test.addClass('mybuttonclass');
    and in my css file :
    Code:
    .mybuttonclass{
        background-image: url('../images/mybuttonimage.gif');
    }
    obviously it should work with iconCls but it doesn't... at least this way it does !

  5. #5
    Banned
    Join Date
    Jan 2008
    Posts
    11
    Vote Rating
    0
    kiprud is on a distinguished road

      0  

    Default


    thansk a lot. Good job !

Similar Threads

  1. Button with icon
    By nks14 in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 14 Jul 2010, 1:29 AM
  2. Button icon
    By Surgeon in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 28 Aug 2008, 6:07 AM
  3. A button without the button frame, just keeping the icon?
    By Joche in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 1 Jul 2008, 6:19 AM
  4. Toggle button: change button icon when pressed?
    By dbadke in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 26 Mar 2007, 7:14 AM

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar