-
24 Oct 2010 9:02 PM #1
Adding Custom icon in the tab bar
Adding Custom icon in the tab bar
Hello,I am trying to add custom icon in the toolbar.but it seems not working.i tried background-image instead of -webkit-mask-box-image.but this doesn't helps me....any ideas????
-
25 Oct 2010 3:16 AM #2
Yes, show us your CSS, also take a quick look in the search result :
http://www.sencha.com/forum/showthre...highlight=icon
http://www.sencha.com/forum/showthre...highlight=icon
Personnaly I do this :
1. adding class to myPanel:
Then in the CSS :Code:iconCls: 'icnHom',
Code:.icnHom { -webkit-mask-box-image: url(data:image/png;base64,iVBORw0KGg..../LHEKZXOUWaBm2Pk95DylTf);}
-
25 Oct 2010 9:35 AM #3
Hello Gabriel,
How do I use the standard icons? If I do something like this (dockedItems of a panel):
I dont get the standard info-icon. Do I have to add the class to my custom CSS as you described? If yes, how do I become the url tag?Code:items: [{ iconCls: 'info', title: 'Info' }]
-
12 Nov 2010 7:25 PM #4
Inside the "URL tag" is a base64 encoded image. You can go to
http://www.greywyvern.com/code/php/binary2base64
Just enter the URL where you store the image and it translates it to base64
-
28 Mar 2012 4:36 AM #5
I customized tabbar icons on Sencha Touch 2 using:
I customized tabbar icons on Sencha Touch 2 using:
in the .js file:
and in the css file:Code:{ xtype: 'tabbar', id: 'bottom-tab-bar', ui: 'dark', docked: 'bottom', layout: { pack: 'center', align: 'center' }, items: [{ id: 'contacts-tab-button', cls: 'selected', labelCls: 'tab-button-label', title: 'Contacts', }, ...and so on with the other tabs }
Code:#bottom-tab-bar { border-top: none; background-image: url('/sencha/resources/images/bottombar_background.png'); background-repeat: no-repeat; background-size: cover; background-color: transparent; } /* control the active state of the child tabs */ #bottom-tab-bar .x-tab-normal { /* required for setting the image to our custom one */ background-repeat: no-repeat; background-position: center; background-color: transparent; background-size: 38px 38px; /* controls the label color */ text-align: center; color: light-blue; } /* control the active state of the child tabs */ #bottom-tab-bar .x-tab-active { /* required for hiding the selected state box */ border: none; box-shadow: none; -webkit-box-shadow: none; } .tab-button-label { font-size: 0.5em; color: light-blue; } #contacts-tab-button { background-image: url('/sencha/resources/images/bottombar_contacts_icon_normal.png'); } #contacts-tab-button.selected { background-image: url('/sencha/resources/images/bottombar_contacts_icon_selected.png'); }
Similar Threads
-
Adding Custom Icon to TabBar
By napsys in forum Sencha Touch 1.x: DiscussionReplies: 3Last Post: 20 Sep 2010, 5:49 AM -
Ext JS 2.2.1 - Custom Tab Icon
By mayura in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 23 Oct 2009, 4:21 AM -
adding custom button title bar
By sawan in forum Ext 2.x: Help & DiscussionReplies: 6Last Post: 1 Jul 2009, 5:24 AM -
Adding custom buttons to a tree/grid panel's title bar.
By shr1975 in forum Ext 2.x: Help & DiscussionReplies: 17Last Post: 5 Jun 2009, 2:10 PM -
Adding buttons on the TAB-bar ?
By mraptor in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 16 Jan 2008, 5:58 PM


Reply With Quote