style

Where can I find a good template for a software application user guide?

Looking for links to resources that will help me write a user guide for a software application. I'm after something that will help me to structure my guide, give it an appropriate writing style, and ensure that it has an excellent look and feel throughout. ...

Changing (Enable/Disable) GroupStyle in ListView for different category items

Hi All, How can I switch between GroupStyles for ListView based on some conditions at run time. For instance I need to use Default for items that that have GroupStyle Header name null, and if it is not null then use custom GroupStyle them? I tried GroupStyleSelector, and it doesn't work, because it works for multi level grouping, and ...

Javascript style dot notation for dictionary keys unpythonic?

I've started to use constructs like these: class DictObj(object): def __init__(self): self.d = {} def __getattr__(self, m): return self.d.get(m, None) def __setattr__(self, m, v): super.__setattr__(self, m, v) Update: based on this thread, I've revised the DictObj implementation to: class dotdict(d...

Preferred method for linking to stylesheets from a UserControl?

We primarily use an ASP.NET environment at work. Right now I'm building an application which uses "Modules", which is just a UserControl, with its' Javascript right in the control, and a link element to the stylesheet for that control. I want to keep it modular, and would like the style of this control to be independent from the markup/j...

javascript closures and function placement

Does the placement of a function have an effect on the performance of closures within scope? If so, where is the optimal place to put these functions? If not, is the implied association by closure enough reason to place a function in another place logically? For instance, if foo does not rely on the value of localState, does the fact ...

Is it possible to format Tooltip-Text (bold, underline... etc) ?

I want to make some passages of a standard tooltip bold in a WinForms application. Is this possible? If not, is there a (free) tooltip component that allows me to style them (preferably also border and background)? Thanks! ...

When should I use a ellipsis in a Menu Item

The question title pretty much says it all. When should I put ... at the end of a menu item? I seem to remember reading some rules but can't for the life of me find them. For context - I'm adding a properties option to a right click menu and am wondering if it is appropriate to add them. regards ...

VB6 PictureBox Mouseover

I'm using a VB6 PictureBox on my User Control. I set the PictureBox's picture, I set the BorderStyle to 0, and I set the BackColor to the User Control's BackColor. The idea is that I want a "floating" icon. However, I want that icon to appear clickable when the mouse hovers over it. Two questions: Which events do I use? MouseMov...

What is the best way to separate column values with a datagrid

If I were writing my own HTML and placing the values in the table I would use css and style the borders using something like: td{ border-left : solid gray 1px; } ...

Why do I have an Issue with binding to an image from a control template?

Hi, I have a style for an items control that binds to an image in the target, it only appears if the target also binds to the image and I have no idea why.. can anyone shed any light on it for me? A simplified version of my style: <Style x:Key="testStyle" TargetType="ItemsControl"> <Setter Property="Control.Template"> <Se...

Best approach for styling navigation using unordered lists in ASP.NET

In ASP.NET (not MVC), what is the best approach to programmatically setting styles on an unordered list used for navigation so the appropriate menu item is styled as the active item if that page is being viewed? This would most likely be used in conjunction with a MasterPage. ...

Do you add information to the top of each .hpp/.cpp file?

When creating a new C++ header/source file, what information do you add to the top? For example, do you add the date, your name, a description of the file, etc.? Do you use a structured format for this information? e.g. // Foo.cpp - Implementation of the Foo class // Date: 2008-25-11 // Created by: John Smith One team I know embeds...

WPF Style Trigger

I change the FontSize of Text in a Style trigger, this causes the Control containing the text to resize as well. How can I change the Fontsize without affecting the parent's size? ...

how do i inherit/overwrite a forced style from a windows theme?

currently i am forcing my WPF app to use the luna theme no matter what, with this XAML code <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Styles.xaml" /> <ResourceDictionary Source="NavigationCommands.xaml" /> <ResourceDict...

How would you implement the pilloried function in the Daily WTF?

The Daily WTF for 2008-11-28 pillories the following code: static char *nice_num(long n) { int neg = 0, d = 3; char *buffer = prtbuf; int bufsize = 20; if (n < 0) { neg = 1; n = -n; } buffer += bufsize; *--buffer = '\0'; do { *--buffer = '0' + (n % 10); n /= 10; ...

Flex Icon on Button sizing [Design]

I would like to size the width of my button according to its icon image. I tried to force padding to 0 with no success. In a tile <mx:Button id="m1" icon="@Embed('m1.png')"/> See the result http://img513.imageshack.us/my.php?image=iconkg3.png How could i change this gap ? Thanks. ...

Python style

Simple beginner question: I've created a small python script to toggle between two files I'm using for testing. My question is, what is a good python format style for the following code: import filecmp import shutil local = "local.txt" remote = "remote.txt" config_file = "C:\some\path\file.txt" shutil.copyfile( remote if( filecmp.cm...

Internet Explorer submit button styling

I'm making a web application and I got the design for it from a sub-contracted design company. The design is pretty nice, I like it, but I've stumbled across one thing I'm not sure how to implement nicely. The thing is - they've redesigned the looks of buttons to match the page style. So now I have two images - button up and button down...

Do you leave parentheses in or out in Ruby?

When possible.. do you leave parentheses in or out in Ruby? ...

How to set background color based on bool property in WPF

I want to set the backgroun color for a GridViewColumn that is databound inside of a listview in WPF. I'm not sure how to ask this question being fairly new to WPF, otherwise I wouldn't have bothered all of you. I want to change the background color of the whole row, based on a bool flag in my databound object. In this case, I have, we...