style

style.display='none' doesnt work on option tags in chrome, but it does in firefox, anyone know why? or a workaround?

ok, heres some sample code that demonstrates the problem. if i click the button in firefox, the first option disappears. if i click the button in chrome, nothing happens, or rather if i inspect the first option, it does have the attribute "style='display:none'" but the option itself on the html page is not hidden. <form> <select> <optio...

WPF: How do I get a reference to a styled window control in code behind?

I have a window defined with a style: <Window x:Class="winBorderless" x:Name="winBorderless" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Local="clr-namespace:WindowStyle" Style="{StaticResource Window_Cartesia}" ...

Given UIElementCollection, find all elements that have StyleA, and change them to StyleB in WPF

I've got a MyGrid.Children UIElementCollection, I would like to find all the Rectangles in it that have there styles set to StyleA, and set them to StyleB. I'd like to use LINQ if possible, so I can avoid a nasty nested loop. Something like this pseudocode: var Recs = from r in MyGrid.Children where r.Style == Styl...

how to change the look and feel for Qt form ?

i need to change my form look and feel and i dont know : what i need to download and install ? is there any ready to use look and feel installed into qt library ? i am using windows and qt 4.4.3 ...

Problem with CSS selector

I have a link <a href="..." class="fancylink">text</a> I used the code .fancy { text-decoration:none; } but it still underlined, if I set it to "underlined" it double underline it. So I can't take control of a link style using a Class? ...

What is the best way to get the first item from an iterable matching a condition?

In Python, I would like to get the first item from a list matching a condition. For example, the following function is adequate: def first(the_iterable, condition = lambda x: True): for i in the_iterable: if condition(i): return i This function could be used something like this: >>> first(range(10)) 0 >>> firs...

WPF Setting on a Control Template

Hi, General question. I have a ControlTemplate that is reasonably complex. Several TextBoxes etc. I can't use TemplateBinding to bring all the properties to the surface so that I can set all the styles. Is there a way for a Style to 'delv' into the controls within a control to set values? Hope my question is clear without an example...

WPF, how to override an application wide style on textblocks on specific places

I have a style xaml resource dictionary which is added in Application.xaml. In that style file I specify that all textblocks should have the foreground white. The problem is that this will change the combobox items foreground to white in a usercontrol I have in the same application. I want the items to have a black foreground in all or o...

Remove style from all child elements

i have a panel (A), which contains 3 other panels (AA, AB, AC). Each of the subpanels contains Label and Button. The label has a style. How can i remove all styles from all labels over A. My idea was to make something like A.getChilds().removeStyleName();... edit: the number of the subpanels is variable...from 2 to 1000. Each subpanel h...

WPF combobox colors

I'm changing the look of all ComboBoxes in my application by adding this style to App.xaml: <Style TargetType="ComboBox"> <Setter Property="Foreground" Value="White"/> <Setter Property="Background" Value="#303030"/> <Setter Property="BorderBrush" Value="#000000"/> </Style> There are two colors that I ha...

Inline style being ignored

I have a fairly simple cell in a table with an inline style: <td style="text-align: right;"> Current Status: </td> And the text-align-right is being ignored, both in Firefox and Opera. I used Firefox's "firebug", and it shows me <td style=""> for this. Any idea what could be going on? I thought that an inline style specified this w...

Looking for workaround for IE8 opacity bug

One of my css styles has a black background color and a filter with an opacity. This is supposed to be translucent and almost always is. There is one exception to this. IE8 doesn't play nice with a lot of Microsoft's other products, and update panels in .NET seem to be one of them. If I have an updatepanel that sends a javascript aler...

Setting toolbar button sizes using a Style

I have buttons on a toolbar in WPF. When I do the XAML: <ToolBar.Resources> <Style TargetType="{x:Type Button}"> <Setter Property="Width" Value="21"></Setter> <Setter Property="Height" Value="21"></Setter> </Style> </ToolBar.Resources> None of the buttons on the toolbar set their sizes accordingly. I have to go to ...

how to set style to grid in extjs

how to set style to grid so that it display font-family i am tring like this style: {'font-family': 'Brush Script MT', 'font-weight': 'bold' } but result does not show according to it. and i m also trying style:'font-family:Brush Script MT; font-size:300px', but it also not show the result according to i...

javascript style.visibility doesn't seem to work....

In my aspx page i have a tr which is set visible="false" by default... But on a selected index of a dropdown i make it visible="true" ..... On the form submit i am validating the control within the tr but couldn't find whether the tr is visinle or not using javascript... My aspx: <tr id="MeasurementTr" runat="server" visible="false"> <...

Applying a style to a gridview

I have been tearing my hair out all afternoon on this, hopefully someone can help me. Bear with me on this one. I have a number of styles in my App.xaml which transforms a gridview, the code looks like this. <Application.Resources> <Style x:Key="{x:Static GridView.GridViewScrollViewerStyleKey}" TargetType="{x:Type ScrollV...

How do I apply a style to all buttons of an Android application

I have a style applied to my whole application: AndroidManifest.xml: <application android:theme="@style/ApplicationStyle" android:icon="@drawable/icon" android:label="@string/app_name"> And in my styles.xml: <style name="ApplicationStyle" parent="android:Theme"> <item name="android:button">@style/CKButton</item> </style> <style...

WinForms - DataGridView Inherits style from GroupBox

I have a weird problem, and I don't know if this is the default behaviour of .Net DataGridView inside a GroupBox/TabControl. I've created a new WinForm project from scratch, and created a GroupBox(changed the text style). Like this: Then, I've created a simple DataGridView, no font style at all, like this: Then, in design mode, I ...

Qt style control

I have a qt app that is defaulting to looking like windows 98. Is there some way to get it to look better? I like the appearance it has on GNOME or KDE, but even getting it to look like windows XP would be an improvement. ...

format dojo DataGrid header row

I want to assign a background color to my programmatically created Dojo DataGrid's header row. I've tried to override the defaults by adding .dojoxGridHeader or .dojoxGrid-Header to my style sheet, but these have no effect. Is there another way, such as with a Dojo event or property? If my style sheet is the only way to go, am I using t...