ellipsis

How do you use the ellipsis slicing syntax in Python?

This came up in Hidden features of Python, but I can't see good documentation or examples that explain how the feature works. ...

CSS column header with img - how to dock img/div to the right?

Howdy! I have an HTML table that I use as column headers to a grid view. Clicking on a column header triggers javascript that makes the grid view sort, and an icon showing that the column is sorted shows up next to the column text, similar to below: |---------------------------------------------------------------------------------| | ...

JavaScript: Insert ellipsis (...) into HTML tag if content too wide

I have a webpage with an elastic layout that changes it's width if the browser window is resized. In this layout there are headlines (<h2>) that will have a variable length (actually being headlines from blogposts that I don't have control over). Currently - if they are wider than the window - they are broken into two lines. Is there a...

Ellipsis at start of string in WPF ListView

I have a WPF ListView (GridView) and the cell template contains a TextBlock. If I add: TextTrimming="CharacterEllipsis" TextWrapping="NoWrap" on the TextBlock, an ellipsis will appear at the end of my string when the column gets smaller than the length of the string. What I need is to have the ellipsis at the beginning of the string. I....

How to disable ellipsis of cell texts in a WindowsForms DataGridView?

I have a DataGridView in readonly mode in a .NET 3.5 (Visual Studio 2008) WinForms application. The cells' width is very small. Some of the cells contain a short number. Now, even with a small font, sometimes the number is shown with an ellipsis. For example "8..." instead of "88". Is there a way to let the text flow over the next cell...

AutoEllipsis in StatusStrip Label?

Hi, I'm coding a Windows Forms App that has a StatusStrip that displays status informations to the user, and hints when the mouse is over relevant things. However, when the program is on it's minimal window size, the text sometimes is bigger than the whole StatusStrip, and the label simply dissapears. There must be a workaround to this, ...

Variadic function without specified first parameter?

Out of curiosity, I thought I'd try and write a basic C++ class that mimics C#'s multiple delegate pattern. The code below mostly does the job, with the nasty sacrifice of losing almost all type-safety, but having to use the initial dummy parameter to set up the va_list really seems a bit off. Is there a way to use va_list without this? ...

Format DataGridView Cell without changing underlying value?

I have an unbound DataGridView (in VS 2008), of which one column contains a file path. I'd like to format the string using the TextRenderer class on the ColumnWidthChanged event without actually modifying the underlying value. The problem is that the contents of the table are saved when the form is closed and I don't want to save the for...

PHP inserting ellipsis in the middle(!) of a string?

I am working on a PHP forum software (FluxBB) and a user encountered a rather interesting error, that - so it seems - PHP is inserting an ellipsis in the middle of a string. Due to a similar error I found on the net I feel forced to say that this code is situated in a function and that $db is a global variable. Here's the (simplified) ...

Trim text to 340 chars

I'm pulling blog posts from a DB. I want to trim the text to a max length of 340 characters. If the blog post is over 340 characters I want to trim the text to the last full word and add '...' on the end. E.g. NOT: In the begin.... BUT: In the ... ...

using catch(...) (ellipsis) for post-mortem analysis

Someone in a different question suggested using catch(...) to capture all otherwise unhandled - unexpected/unforseen exceptions by surrounding the whole main() with the try{}catch(...){} block. It sounds like an interesting idea that could save a lot of time debugging the program and leave at least a hint of what happened. The essence ...

Anybody know a way to use CSS text-overflow on text that's wrapping?

Does anybody know of a way to use {text-overflow: ellipsis;} on a piece of text that's wrapping to a second line? Adding {whitespace: nowrap;} makes text-overflow work, but I need the text to wrap so I really can't use that. ...

Does throw inside a catch ellipsis (...) rethrow the original error?

If in my code I do the following snippet: try { doSomething(); } catch (...) { doSomethingElse(); throw; } Will the throw rethrow the specific exception caught by the default ellipsis handler? ...

C# Path Ellipsis without Win32 API call

I have a long path I'd like to shorten for displaying on a form using the ellipsis character(s?). I know there is the PathCompactPathEx Win32 API call, but I know there is a built-in .NET equivalent. I have used it previously, but cannot find it any more. Any hints, please? ...

Ellipsis notation in C#?

Where can I get info about implementing my own methods that have the ellipsis notation, e.g. static void my_printf(char* format, ...) { } Also is that called ellipsis notation or is there a fancier name? ...

FireFox text-overflow ellipsis hack removes all other styling

I'm trying to implement text-overflow: ellipsis; support in the FireFox version of my web site. I've found the XUL hack on the web and have applied it to the stylesheet, but I find that applying the hack removes all other styling from the element. In other words, I can either have the ellipsis, or I can have the background image, gradi...

javascript/php - shorten string to fit into a certain # of lines

Hi I have a string that must fit into a box, and must be at most 3 lines long. To shorten it, I plan to truncate it and end it with '...'. I could shorten it to a certain # of characters but if i make it look good with "wwwwwwwww [...] wwww" it won't look right with "iiiiiiiiiii [...] iiii". Is there some way I can shorten it by how mu...

How do I get -moz-binding to work for ellipsis with data:text/xml?

We have a lot of elements on the project I am working on that use ellipsis styles, which, of course, work fine with pure CSS in all major browsers but FireFox. We implemented the -moz-binding fix for that which references the xml file with the binding information for cropping an element defined with XUL/XBL as defined here and it worked...

How do I detect if a System.Windows.Forms.Label with AutoEllipsis is actually displaying ellipsis?

I have a Windows Forms Application where I display some client data in a Label. I have set label.AutoEllipsis = true. If the text is longer than the label, it looks like this: Some Text Some longe... // label.Text is actually "Some longer Text" // Full text is displayed in a tooltip which is what I want. But now I want ...

How to use R's ellipsis feature when writing your own function?

The R language has a nifty feature for defining functions that can take a variable number of arguments. For example, the function data.frame takes any number of arguments, and each argument becomes the data for a column in the resulting data table. Example usage: > data.frame(letters=c("a", "b", "c"), numbers=c(1,2,3), notes=c("do", "re...