style

Ajax or JavaScript: Changing Style According to Server Response

Hey, I'd like to change the font color or the responseText based on the result. For example, if the responseText is NOT FOUND, I'd like to font color to be red. Otherwise, it will be black. It's currently displaying the correct responseText; I just want to change the color when necessary. Here is my current Ajax: function newXMLHt...

Is line-height variable between browsers

So I've done a bit of googling around and can't seem to find a clear answer. Does the line-height property vary between browsers at all or is it just standard and font-size is all that we need to worry about? ...

Style question: do you set your nav controller for all the child view controllers, even if they're not the top level view that is on the nav stack?

Let's say you have a tab view controller on the navigation controller view stack. (For the sake of argument.) Your tab controller has an array of view controllers for each of its tab views. Your tab controller's navigationController is clearly set to the nav controller (since its view is on the stack.) But would you set the navigationCo...

WPF/XAML Custom ScrollViewer ScrollBar w/o Custom ScrollBar in Inner Controls (like TextBox)

Hello, and thank you for looking into my question. I would like to customize the ScrollBar in my ScrollViewer. No problem. But wait. When I do that, it also changes the ScrollBar of the inner controls. I don't want to impact those ScrollBars. How do I specify the correct scope? Here's the XAML that almost works: <Page xmlns="http://s...

Searching in Latex for beginning of keywords

Hi everybody, I wanna use listings in LATEX with my own style. Because I don't want to add any keyword in my preset, I want to search for beginning of keywords. Latex should know, that any keyword begins with NS or with UI. For my it is impossible to add all keywords of Cocoa Touch and Objective C to my \lstdefinelanguage{ObjectiveC} .....

WPF: Accessing a style of ResourceDictionary from inside of usercontrol

Normally, to set style using C#, I write, btn.Style = (Style)FindResource(_styleName); But what to do, if style is defined inside main 'ResourceDictionary', and button is inside some 'UserControl'. Also, I need to write script inside 'UserControl' only. To make it more clear - There is a button inside UserControl which should take sty...

How to Make a Nice Block of Commenting in Visual Studio

I just switched back to c++ after leaving it for awhile and I can't seem to remember how to make nice function/class comment boxes in VS. What I'm looking for is something like this: /** * Convenience struct: coord * ------------------------- * Simple C++ struct (which is like a class, except there are * no methods and everything...

Right-align legal-styled numbers and left-align text in ordered lists using CSS

While composing documentation, I created an outline using ordered lists within ordered lists and applied a pseudo-legal-style row numbering using CSS. The default behavior of lists is to right-align numbers and left align text; however, the CSS2 snippet I'm using is changing that behavior so that numbers are left-aligned and text, thoug...

WPF ListBox retain view on SelectedItem on change of Style

Hi, I have a ListBox whose Style and ItemTemplate I change in code-behind on click of specific buttons. listbox.ItemTemplate = FindResource("dataTemplateView1") as DataTemplate; listbox.Style = FindResource("listBoxStyle1") as Style; There are three possible views so there are three sets of data template and style. The DataTemplate c...

Applying Custom Style to ASP.Net Calendar control

I want to apply custom css to my calendar control. I have applied the same at corresponding locations for e.g. e.Cell.CssClass = "highlight"; clndrEvt.TodayDayStyle.CssClass = "currentDay"; clndrEvt.OtherMonthDayStyle.CssClass = "OOB"; clndrEvt.NextPrevStyle.CssClass = "dayTitle"; However when i render the control, my styles are not ...

Which of these functions is the most proper in terms style and cleanliness?

I'm having an internal dispute about the right way to do something. Maybe you can help :) Let's say I have the functions foo(x, y) { if (x satisfies condition c1) if (y satisfies condition c2) bar(x) else bar(x) ... } bar(x) { ... } An alternative to this would be foo(x, y) { doBarFlag = false if (x...

Learn how to create LaTeX styles?

Hi How can I learn how to create LaTeX styles? The normal way when creating a LaTeX document is to start with something like. \documentclass[a4paper]{report} \documentclass[a4paper]{article} \documentclass[a4paper]{letter} And that seems to call a .cls (and a .sty) file like letter.cls, that is controlling the actual layout of the...

ComboBox drop down not dropping

I have a style for a ComboBox that I've been using for awhile, but I wanted to tweak the color of the drop down arrow. To do this, I just took the default template for the comboBox and pasted it into my style, and changed the arrow color fill. It looks perfect - until I hit the drop down! Nothing happens. If I cut the template from the ...

How do you change the color of a Telerik GridGroupByExpression arrow?

Does anybody know how to change the color of GridGroupByExpression arrow shown at the link below? http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/outlookstyle/defaultcs.aspx I haven't figured out how to change the color from the default black. I'd like to change the several I have in my project to white (in the above demo it'...

Set "style" in code in Asp.net

I have a page with multiple tables on it and I want to have a page break for printing between these tables. If I manually set the element's style to "page-break-after:always" it seems to work. <table style="page-break-after:always;"> But I'm added the tables dynamically so I need to do it in code ... just don't know how. (I have ver...

Print out Fonts from the Google Font API

I'm using the google font api, and now I'm trying to create a print.css file. I'm trying to get the fonts to print out but I'm not having any luck. Does anyone know of a way to have fonts from the google font api print out? thanks ...

Binding a Property of an object in Item (row) to a DataGridCell Property in WPF DataGrid

Using Release WPF DataGrid I am trying to bind to the property of a CellViewModel (that supports INotifyPropertyChanged of course). I am binding the DataGrid's ItemsSource to an ObservableCollection of type RowViewModel (which is inherited from Dr.WPF's ObservableDictonary) of type CellViewModel and I want bind to a property of a CellVie...

Typing convention for local collections in Java

I recently ran across a set of code which instantiated local maps as following: HashMap<String, Object> theMap = new HashMap<String, Object>(); Typically, when I've seen HashMaps used (and used them myself), the local variables are simply Map (the interface), rather than being tied to the specific implementation. Obviously this is re...

Prefixing property names with an underscore in Objective C

I've always avoided underscores in my variable names, perhaps because its just not what was done back in my learning Java in college days. So when I define a property in Objective C this is what I naturally do. //in the header @interface Whatever { NSString *myStringPorperty } @property (nonatomic, retain) NSString *myStringPropert...

C# style question, ctor variable names & class property names

Trying to do everything by the book, is this correct?: public class JollyHockey { public string AnotherCoolProperty { get { return anotherCoolProperty; } } string anotherCoolProperty; public JollyHockey(string anotherCoolProperty) { this.anotherCoolProperty = anotherCoolProperty; } } Or do some people us...