Hi, I am trying to add an elipsis for some text inside a div using css. for example, <div style="???????"> WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW </div> What I want is for the end result to look like: WWWWWW... Or at least just cut off without the .... The div is inside a td which stretches out when the text is too long, and making the td or div a fixed width is not an option. How can I do this? Thanks!
_iobuf
Posts
-
CSS question about text trimming -
Visuals cut off by Frame control in Windows Classic themeI am working on an app which had most of its UI developed by someone other than myself, who is not a software developer. I am working on the UI and I keep running into an issue with the Frame control. Everything looks fine on all the themes except Windows Classic. When I switch to Windows Classic and run the application, a lot of the UI is cut off where the edges of the frames are. It turns out that there are a lot of negative margins everywhere that were used to align the UI elements properly, and it looks fine but totally backfires in the Classic theme. It looks like the UI elements in that theme don't get rendered if they are outside the frame, unlike the rest of the themes. We want to avoid this, and one solution is to modify the containing frames and fit everything inside them, but that would be a HUGE task given the complexity of the UI. Is there a way to have the UI elements show up without being cut off if their margin is outside the boundaries of the Frame? Thanks!
-
Pasting image to word: image size issuesI have a word document and I want to paste an image into a cell. Both the cell and the image can be of any size. I am using Microsoft.Office.Interop.Word to do this. After getting the right cell and copying the image to the clipboard, when I call
cell.Range.Paste();
the image gets pasted into the document, but it doesn't get auto resized to fit the cell dimensions. If I select the image with my mouse and then press ctrl + v, the image is re-pasted and auto resized. Is there a way to paste the image from code and have it resize? Thx -
How to make the html visible to email clients?Thanks. I ended up figuring it out on my own, but this was the solution.
-
How to make the html visible to email clients?I am working on a tool that generats html code and sends it to any given email(s). The problem is when the html is sent, it just shows the source code in the email instead of the actual html visuals, formatting, etc. How can I make email clients display the html properly? i.e. is there some kind of property to add to the html code that will show it in emails, like
<META http-equiv=Content-Type content="text/html; charset=unicode" ShowInEmail="true">
-
Parse out all the "{" + string + "}" occurences?This is a good solution too, thx
-
Parse out all the "{" + string + "}" occurences?Thanks.. I used that in a loop and put all the key values as the string to be replaced
-
Parse out all the "{" + string + "}" occurences?Is there a way to iterate through a string of text and find each occurence of a string that contains a substring of "{" + (variable string) + "}" and replace it with a corresponding string defined in a dictionary (of which the key value is the "{" + (variable string) + "}" ??
-
RichTextBox UI elements animating??Fixed: Set the RichTextBox HorizontalAlignment to Stretch
-
RichTextBox UI elements animating??I have a RichTextBox in my app, which is inside a control that is composed of a grid with 2 columnds, i.e.
<Grid x:Name="LayoutRoot"
VerticalAlignment="Top" Height="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border x:Name="bdrLeft" Height="Auto"
Background="{DynamicResource SplitRichTextBoxRightSideBGBrush}"
BorderBrush="{DynamicResource SplitRichTextBoxRightSideBorderBrush}"
BorderThickness="1,1,0,1"
CornerRadius="3,0,0,3"
VerticalAlignment="Stretch">
<ContentPresenter x:Name="cpRightSide"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
Margin="0,0,0,0"
Width="Auto"
Height="Auto"
TextElement.Foreground="{DynamicResource SplitRichTextBoxLeftSideForegroundBrush}"/>
</Border>
<Border x:Name="bdrRight"
Height="Auto"
Grid.Column="1"
Background="{DynamicResource TextBoxBGBrush}"
BorderBrush="{DynamicResource TextBoxBorderBrush}"
BorderThickness="1,1,1,1"
CornerRadius="0,3,3,0"/>
<RichTextBox x:Name="rtbMain"
HorizontalAlignment="Center"
FontSize="{DynamicResource DefaultFontSize}"
Height="Auto"
BorderBrush="Transparent"
Background="Transparent"
Foreground="{DynamicResource DEFAULT_Font_Dark}"
VerticalAlignment="Center"
AcceptsReturn="False"
AcceptsTab="False"
Style="{DynamicResource ClearRichTextBoxStyle}"
Grid.Column="1"
Margin="0,3,0,3">
<localControl:EnabledFlowDocument x:Name="efdMainDocument" PageWidth="{Binding ElementName=rtbMain, Path=ActualWidth}"/>
</RichTextBox>
</Grid>All the animations in the code are set to 00:00:00.00 However, when I add a UIElement or even text to the FlowDocument on startup, the text/uielement appear in the center of the flowdocument, then animate over to the left side where they should be. Is this a bug in WPF? I can't find anything in my code that would cause this.
-
Resource A = Resource B??Is it possible to assign a resource to another resource? For example, if I have a SolidColorBrush named MyBursh01, can I make a MyBrush02 that has the same values as MyBrush01, or can I make a Rectangle named Rect2 and make it = Rect1? I am referring to making it in XAML not C# Thanks
-
TabItem z-index order [solved]Solution: 1) Set Panel.FlowDirection="RightToLeft" on the TabControl 2) Go to TabControl style & find the HeaderPanel 3) Set the HorizontalAlignment of the HeaderPanel to "Right" (or whatever side you choose) 4) Set Panel.FlowDirection="LeftToRight" on the TabItem style
modified on Monday, December 22, 2008 4:08 PM
-
TabItem z-index order [solved]If you make a tabcontrol and add a few tabitems with negative margin, the tabitems overlap each other, but the ones on the right are always on top of the ones on the left. Is there a way to make the tabitems on the left be on top of the tab items on the right?
modified on Monday, December 22, 2008 3:32 PM
-
Binding value of object to another objectIt's because one file has references to colors using StaticResource, and another needs to reference them using DynamicResource so I can then bind the color statically. Basically, I want to have a constant pointer to a field which changes values.. The thing with adding extra objects works so that's kind of what I'm getting at, except I'd like to do it without the extra overhead.
-
Binding value of object to another objectYou can't use a brush as a color
-
Binding value of object to another objectI have a SolidColorBrush resource in one file, and I want to create a copy of it in another file. for example File 1: File 2: I'd like to avoid making a different object with that brush as the fill because that creates overhead. Any ideas?
-
Styles in WPFYou can do
-
xaml files ultra slow?is there any way to speed up the performance of the xaml file editing in vs? it's super slow when editing anything, and sometimes it doesnt even undo/redo..??
-
Styles in WPFYes. I think you can just ignore the "template" setter.. so just erase the
-
Styles in WPFStyle looks like this: <setter property="Template"> <setter.value> <controltemplate targettype="{x:Type Button}"> <controltemplate.resources> <!-- Storyboards go here --> </controltemplate.resources> <grid> <!-- Content goes here --> </grid> <controltemplate.triggers> <!-- Triggers go here --> </controltemplate.triggers> </controltemplate> </setter.value> </setter> You have to put everything in the appropriate place for it to work, then apply the style to the element you want