I wanted to change the styles of calendar panel using extjs.I am using extjs calendarpanel and datepicker in my EHR application like following link
http://dev.sencha.com/deploy/ext-3.4.0/examples/calendar/index.html
when selecting a date from datepicker if the day is a public holiday,(that is get from database on select event )i want to change the background color of calendarpanel to gray color.Is it possible?is any way to change the css class properties using extjs3.3.
you can override the extjs css with the using cls property for the particular element.Here is
i am using own css class for the text.
{
text:'Create App',
cls:'app42CreateApp',
},
You can assign a custom class to the cell you need, for example here is how it works with the 15. day of month:
Ext.get(Ext.get('mydatepicker').query('td.x-datepicker-active[title*="15,"]')[0].id).addCls("mynewclass")
You can take a look to that Extjs 2/3 plugin
Related
I have reusable component button in Angular application on login.component.html with login.component.ts attaching button name with label and function event:
<app-my-btn (onClick)="myFunction($event)" [label]="label"></app-my-btn>
with #Input() and #Output() this.onClick.emit(event); in my-btn.component.ts with own style in my-btn.component.scss.
I'm trying to figure out, how to pass style elements like color and icon from login.component.ts where I'm have specific function and button name.
In result I'm trying to get two buttons with different function, color, icons and names, but the same design from single component my-btn.component.scss
Any guide or advice would be helpful
Well, the best way is to define certain SCSS classes in your my-btn-component.scss and then pass the class name to the component.
TS
// when an input arrives, the class gets replaced and the HTML immediately updates
#Input() currentClass: string = "default-style";
HTML
<app-my-btn (onClick)="myFunction($event)" [label]="label" [class]="currentClass"></app-my-btn>
I'm using a button with bootstrap, something like:
I want to disable the style change when the button is hovered or click. I figured I could do this by overriding btn-default:focus or btn:focus but I also have other <a> tags styled as buttons that I would like to keep the effects of click or focus. Is there a way that I could just override the standard bootstrap css in just this case?
add an id to this particular
then add this css
#overrideBS:focus {
//whatever unique properties you want
}
Add your own class myclass, then set myclass:focus with whatever changes your need adding !important at the end of the overridden value.
Is it possible to apply CSS styles to a dialogue or wizard modal window in Eclipse? I've been able to use the CSS Spy plug-in to figure out most elements but when I bring a modal up, Spy becomes inactive.
Yes it is possible for dialogs and wizards that you create. However changing some of the styles of a dialog or wizard can be quite tricky (such as the dialog background). To some extent you can also apply styles to existing dialogs.
For dialogs you create you probably want to set a CSS class for the dialog area to make it easier to specify styles applying just to the dialog:
#Override
protected Control createDialogArea(final Composite parent)
{
Composite composite = new Composite(parent, SWT.NONE);
composite.setBackgroundMode(SWT.INHERIT_DEFAULT);
WidgetElement.setCSSClass(composite, "DialogClass");
...
This sets the CSS class and the composite background mode.
You can also apply styles to any dialog using CSS selectors in the form:
Shell[style~='SWT.APPLICATION_MODAL'] > Composite > Text
{
font-size: 14pt;
}
which applies the style to a Text control in a application model dialog.
An example Dialog with styling:
No. The CSS styling feature works on Eclipse 4 workbench model which represents the workbench window along with editors and views within it, but not the content of editors, views or dialogs.
I have a simple View (Container) containing a component. Content is added to this component using Ext.getCmp('foo').setHtml('bar');
I want now to change the text color of the component "foo". Using the style-property works fine, but only as long as styleHtmlContent is set to false.
How can I change the text color but still setting styleHtmlContent to true?
You can use the Ext.Component#addCls(String) method to add some CSS class to your component.
Once you bar class is declared in your css file with your text styling, just do :
Ext.getCmp('foo').addCls('bar');
That way, you will simply add some css styling to your component and not override them.
Link to documentation : http://docs.sencha.com/touch/2.3.2/#!/api/Ext.Component-method-addCls
Setting the property styleHtmlCls to <myClass> on the specific component was the trick! Doing so I was able to create an custom css file which contains <myClass> where the custom color is specified...
i am creating a application on extjs4
i wanted to attain the css selection mouse hover property on the textfields and combo box,the effect where.. background color can change on overcls in extjs
please help if you can't understand my question i will post it again!
Thanks
Here is how to do it:
On your field config add your custom css class like this: fieldCls: 'required'
Create your custom CSS class like this:
.required:hover {
background-image:none;
background-color:#FFFFCC;
}
Include your custom css file on the page