-
13 Oct 2010 10:00 AM #1
FormPanel background color in a TabPanel?
FormPanel background color in a TabPanel?
I'm creating a FormPanel as a tab.
What is the best way to have the FormPanel use the dialog background color (cyan) rather that the default TabPanel background color (white)? I like the contrast better on the dialogs.
Obviously, I know I could use bodyStyle and set the background-color attribute, but I was hoping there is a more elegant, theme-friendly way to do this.
-
13 Oct 2010 10:56 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Code:unstyled:true
-
13 Oct 2010 11:17 AM #3
Condor, that would help if I wanted to change the form's background color to "#DFE8F6" explicitly with a stylesheet.
But what I'd rather do is just have the TabPanel take on the normal background color for a plain FormPanel (#DFE8F6 using the defaul Ext JS theme) rather than the usual white. Preferably without stylesheet hacks so I can preserve the ability to easily use themes.
Here's a sample slice of my code:
Code:// Meanwhile, inside the Viewport... { region: "center", xtype: "tabpanel", id: "maintabs", enableTabScroll:true, activeTab: 0, tabPosition: "top", deferredRender: false, defaults: { closable: false, autoScroll: true, border: false }, items: [ ProjectForm = new Ext.FormPanel({ id: "panelProjectForm", formId: "ProjectForm", title: localize_tab_projectform, url: "loglist-ajax.aspx", bodyStyle: "padding: 10px", defaultType: "textfield", items: [ { xtype: "hidden", name: "guid", value: projectguid }, { xtype: "hidden", name: "Command", value: "Save" }, { fieldLabel: localize_project_formlabel_title, value: localize_project_formvalue_title, name: "title", allowBlank: false, anchor: "95%" }, { fieldLabel: localize_project_formlabel_description, value: localize_project_formvalue_description, name: "description", allowBlank: true, anchor: "95%", xtype: "htmleditor" } ] }), // ... More tabs defined here
Similar Threads
-
FormPanel frame false background color
By woozy in forum Ext 3.x: Help & DiscussionReplies: 5Last Post: 2 Jan 2010, 7:52 AM -
changing the background color of formpanel
By harsha_velicheti in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 2 Oct 2009, 7:12 AM -
Setting a background color to a TabPanel
By dana.lees in forum Ext 3.x: Help & DiscussionReplies: 10Last Post: 30 Sep 2009, 7:36 AM -
How to change background color with field in formpanel
By kusoft.net in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 1 Jan 2009, 10:55 PM


Reply With Quote