word-wrap

Wrapping an HTML input button's text value over multiple lines

有些话、适合烂在心里 提交于 2019-11-29 12:04:56
问题 How do I move text to a new line in an HTML input element with the type="button" attribute? I have following code: <input type="button" id="btnTexWrapped" value="I see this is a long sentence here." style="width: 200px;" /> I want the button's text value to be wrapped in two lines. I tried typing it into the next line in HTML. It didn't work as I expected: <input type="button" id="btnTexWrapped" value="I see this is a long sentence here." style="width: 200px;" /> I also tried using all

Text wrapping issue in generated pdf file

无人久伴 提交于 2019-11-29 11:31:54
I have an issue related to wrapping of text in pdf format. For all the formats like xls,rtf, and pptx the report works fine,however in pdf some text gets wrapped i.e. some letters of the text especially the last few letters gets printed in the next line. I have tried almost all the options in the properties for that text. The only way I could reduce the effect was by changing the pdf font name to times roman for those text. However even this does not work in some case. The snippet contains problem TextField : <textField isBlankWhenNull="true"> <reportElement positionType="Float" x="560" y="0"

iPhone: UITextView wrap around UIImage?

馋奶兔 提交于 2019-11-29 10:55:57
How do I get a UITextView to wrap its text around a UIImage like in this image? The image size is not necessarily previously known. IOS 7 and above: UIBezierPath * imgRect = [UIBezierPath bezierPathWithRect:CGRectMake(0, 0, 100, 100)]; self.textView.textContainer.exclusionPaths = @[imgRect]; Swift (credit to Bart van Kuik): let exclusionPath = UIBezierPath(rect: CGRectMake(0, 0, 100, 100)) self.textView.textContainer.exclusionPaths = [exclusionPath] Gil's answer in Swift: let exclusionPath = UIBezierPath(rect: CGRectMake(0, 0, 100, 100)) self.textView.textContainer.exclusionPaths =

C#: Multiline TextBox with TextBox.WordWrap Displaying Long Base64 String

强颜欢笑 提交于 2019-11-29 09:53:38
I have a textbox to display a very long Base64 string. The TextBox.Multline = true and TextBox.WordWrap = true . The issue is caused by the auto-word-boundary detection of the TextBox itself. The Base64 string has '+' as one of the 64 characters for Base64 encoding. Therefore, the TextBox will wrap it up at the '+' character, which is not what I want (because the use might think there is a newline character around the '+' character). I just want my Base64 string displayed in Mulitline-mode in TextBox, but no word boundary detection, that is, if the TextBox.Width can only contain 80 characters,

Balanced text wrapping in HTML

感情迁移 提交于 2019-11-29 09:41:30
In HTML, is there a way to evenly distribute text that is broken across multiple lines? E.g., I don't want: Here is some really long label that ends up on two lines. I'd prefer: Here is some really long label that ends up on two lines. Adobe has proposed that a new css property be added text-wrap: balance . In the meantime they have created a jQuery plugin named balance-text to achieve the same result. Somewhat of a workaround, but you can use non-breaking spaces for the last few words: <p>Here is some really long label that ends on two lines</p> In pure HTML/CSS there isn't a way to

WPF button textwrap style

前提是你 提交于 2019-11-29 09:04:21
How do I change the default textwrapping style of a button in WPF? The obvious solution of: <Style x:Key="MyButtonStyle" TargetType="{x:Type Button}"> <Setter Property="TextWrapping" Value="Wrap"></Setter> </Style> doesn't work, because Textwrapping isn't a settable property here, apparently. If I try: <Style x:Key="MyButtonStyle" TargetType="{x:Type Button}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <TextBlock Text="{Binding}" Foreground="White" FontSize="20" FontFamily="Global User Interface" TextWrapping="Wrap"/> </ControlTemplate> </Setter

How do you get vim to display wrapped lines without inserting newlines?

♀尐吖头ヾ 提交于 2019-11-29 05:41:34
I'm getting back in touch with my inner (g)vim due to an unscheduled MacBook mother(board) of a meltdown (my emergency backup Linux box won't run TextMate). All told I'm happy with vim's efficiency and power, but I'm mortified at how hard it is to get the kind of word wrap that even stupid HTML textareas achieve with no apparent effort. Consider the text Etiam ornare mollis tortor. Suspendisse sed neque. Nullam in elit. Cum sociis nullam. By default, with an 80-character width vim displays this as Etiam ornare mollis tortor. Suspendisse sed neque. Nullam in elit. Cum sociis nu llam. This

Java code for wrapping text lines to a max line width

不打扰是莪最后的温柔 提交于 2019-11-29 05:33:45
Before I re-invent the wheel (poorly), I'd like to know if there is a some existing Java code for wrapping text lines to a given maximum width. Ideally it would: respect existing linebreaks break up lines that exceed a maximum length on word boundaries break up words whose length exceeds the maximum line width by inserting hyphens Edit: there are no "pixels" here, only java.lang.String. "maximum width" refers to the number of characters on a line. Apache commons has WordUtils and wrap function in it: http://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/text/WordUtils

Howto prevent eclipse from line wrapping in XML and HTML files?

拈花ヽ惹草 提交于 2019-11-29 05:29:10
Is it possible to completely stop Eclipse from line wrapping XML and HTML files? It is easy to do this i.e. for java files, but I couldn't find similar settings for XML and HTML files. VonC Note: the word/line wrapping in eclipse is a "sore" topic, since 2003, as this massively voted bug 35779 As Bozho mentions, there is only hard-wrapping (at a specify length) alt text http://www.openengsb.org/images/codingstyle/eclipse-xml-settings.png Reminder: Soft will just warp the text at the right window border without adding new line numbers (so there are gaps in the list of numbers when you enable

Wrapping HTML text in a JEditorPane inside a JScrollPane

余生长醉 提交于 2019-11-29 02:42:37
In an application, I'm using uneditable JEditorPanes as a sort of a generic UI widget that can display somewhat complex content (HTML will do the trick), wrap text lines and catch mouse clicks. Not sure if JEditorPane is a good choice for this, so feel free to suggest alternatives. The following sample code works fairly well: import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.JEditorPane; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.ScrollPaneConstants; public class Main { private static JPanel