style

WPF style to perform translation after scaling

Hi all, I've got a button style that I've been developing in WPF, as stated in this question. Another thing I'd like to do with this style is to have the button shrink just a little bit, to make it appear like it's getting clicked as it's getting clicked. Right now, the transform code looks like: <Trigger Property="IsPressed" Value=...

Internal typedefs in C++ - good style or bad style?

Something I have found myself doing often lately is declaring typedefs relevant to a particular class inside that class, i.e. class Lorem { typedef boost::shared_ptr<Lorem> ptr; typedef std::vector<Lorem::ptr> vector; // // ... // }; These types are then used elsewhere in the code: Lorem::vector lorems; Lorem::ptr lorem(...

Javascript hover effect removes pre defined style.

I am using a tutorial from Imar Spaanjaars' web site to make an entire table row clickable and have a hover effect on it also. Once the user hovers over the table row it removes the pre defined background color for that row. I want to make it so that way it does not overwrite this style. How might I do that? <script type="text/java...

round corners and color border on html form elements

how can i make cool checkbox and selectbox elements in html form , that work in IE too ? ...

Display problem in IE6

I have a web page that shows a schedule. The schedule is being shown incorrectly in IE 6. Here is a schreenshot: SCREENSHOT DELETED FROM WEBSERVER The Green menu on the left is floated left. In IE6, the schedule table is being shown below the bottom of the menu. I can replicate the problem in modern browsers by applying a clear: right ...

Xaml Inherited Styles

Is there a way in XAML to set a style that will apply to all controls? For example below I would like to put a margin on all my controls. I can add a style for each type by change the TargetType to Button, CheckBox, etc. Instead, I would like to set it up like I have below where I set the style on all types that inherit from Control: ...

[WPF] ComboBox Style problems with DisplayMemberPath

I have a ComboBox and I have set the combo.ItemsSource property to a List object. The Book class contains two properties: "Abbreviation" and "Name". I have set the ComboBox's DisplayMemberPath to "Abbreviation" but the following style that is set on the ComboBox does not display the Abbreviation property, but instead shows "Words.Book" ...

<div css help!

Hi there, i am trying to create a website with div's and css styleing, what i want to do is sit 2 divisions one on top of the other, but centered to the middle of the page, so the top box will be called container, and the bottom box will be called quicklinks an example of what im trying to achieve is http://www.whirlpool.net.au/ so i h...

CSS style for an element that has class A and class B

I need to style an element that has both class "a" and class "b". How do I do it? The order the classes appear in the html might vary. <style> div.a ? div.b{ color:#f00; } </style> <div class="a">text not red</div> <div class="b">text not red</div> <div class="a b">red text</div> <div class="b a">red text</div> ...

Make WPF ComboBoxes fill a whole column width

I'm having problems making a ComboBox stretch to fill the whole column width in a GridViewColumn. It should also resize when the column is resized. In the following example I have a StackPanel with a ComboBox inside. This is set to stretch and will in fact stretch to fill the StackPanel width. Then I add a ListView with one column, c...

Given a pointer to a C++ object, what is the preferred way to call a static member function?

Say I have: class A { public: static void DoStuff(); // ... more methods here ... }; And later on I have a function that wants to call DoStuff: B::SomeFunction(A* a_ptr) { Is it better to say: a_ptr->DoStuff(); } Or is the following better even though I have an instance pointer: A::DoStuff() } This is purely ...

Centering Text in HTML

I know at first this seems like a very stupid question, but I have a good reason for asking it. Even though I might just be misled. For EVER I have been using the <center>Text</center> tag to have text appear centered horizontally. Apparently this tag is depreciated, and is no longer used. So I have tried using <p align="center">Text</...

Get actual margins of an html element in c#

I need to get the actual number of pixels that an IHTMLElements margin is taking up, in my c# code. I've looked in it's style and currentStyle members, but the relevant parts are either null or set to "auto". Searching the internet has shown up the getCurrentStyle function in javascript, but I need these numbers in my c# code. Obvious...

ASP.Net MVC Page Styling

I've got a css file that i want to use to style my ASP.Net MVC web application. I've included it in the solution however it doesn't seem to be taking any effect. Have I missed something? ...

Strange issue with fixed form border styles in Vista

My previous post about this issue didn't got too many answers and it was kinda specific and hard to understand. I think I've managed to understand the problem better and I now believe it to be a Vista issue... The problem lies on all types of fixed border styles like FixedDialog, Fixed3D, FixedSingle and FixedToolWindow. It does not hap...

A question of ruby style from a newbie

USER = "user" PASS = "pass" QUERY = "SELECT c1, c2, c3, c4, c5, c6, c7 FROM table" SQLITE_SCHEMA = 'c1, c2, c3, c4, c5, c6, c7' sqlite_db = SQLite3::Database.new('sqlite.db') odbc_db = DBI.connect('DBI:ODBC:database', USER, PASS) odbc_db.select_all(QUERY) do |entry| sqlite_db.execute "insert into smnt (" + SQLITE_SCHEMA + ") values ...

Make ABC Ordered List Items Have Bold Style

I have an html Ordered list with type set to "A" <ol type="A">...</ol> Thus, each list item will start with A, B, C, etc. I would like to style the A, B, C letters to be bold. I have tried setting font-weight:bold; via css, but it didn't work. Any suggestions on how to do this? ...

How can I change textbox style in a textbox style data trigger?

I have created a default style for my textbox controls, but I would like to be able to change the style at runtime. I have a property that I want to bind to that informs the UI if the data is mandatory or not, and I want to be able to change the style of the textbox to another style that displays a red line under the textbox. I can't u...

How can I get a close button on a templated TabItem in WPF?

I have a tabcontrol where the tabitem's are datatemplated. The template seems to work correctly, in that the usercontrol I want to show in the tabitem is showing correctly. What I am not sure of is how to get a "x" to show up in the tabitem so I can close each tab, since they are dynamically generated through a template. Being fairly ...

How can I use a custom TabItem control when databinding a TabControl in WPF?

I have a custom control that is derived from TabItem, and I want to databind that custom TabItem to a stock TabControl. I would rather avoid creating a new TabControl just for this rare case. This is what I have and I'm not having any luck getting the correct control to be loaded. In this case I want to use my ClosableTabItem control in...