Underline the single line of text from the paragraph in PHPEXCEL - phpexcel

How to underline a single line of text from the paragraph in the single column using PHPEXCEL

Try this
for native php
$objPHPExcel->getActiveSheet()->getStyle('b4')->getFont()->setUnderline(true);
for Codeigniter
$this->excel->getActiveSheet()->getStyle('b4')->getFont()->setUnderline(true);

If it's just a single block of text in a cell, and not the entirety of the content of the cell, then you need to define the content of that cell as Rich Text
There's an example of setting a cell with Rich Text in /Examples/02types.php
$objRichText = new PHPExcel_RichText();
$objRichText->createText("Hello ");
$objUnderlined = $objRichText->createTextRun("underlined");
$objUnderlined->getFont()->setUnderline(true);
$objRichText->createText(' World.');
$objPHPExcel->getActiveSheet()
->getCell("A1")
->setValue($objRichText);

Related

display non-editable text in JavaFX with different CSS styles

Some text display in resizable AnchorPane. It may be Label or Text (not editable). In text may be bold (fat) words, for example. How to implement it? Text in Label or Text may be only in one style. When I link bold word with other text as two different Labels, I have problem with text wrapping (.setWrap(true)).
I found answer) TextFlow use for this.
https://docs.oracle.com/javase/8/javafx/user-interface-tutorial/text-settings.htm#CHDEEAFG

Line Height in SSRS

Is there a way to adjust the line height in SSRS? I have a requirement on a legal document to have a bigger line height.
From what I have read, the Textbox.LineHeight property only affects html. I have converted the text inside the textbox to html, set the LineHeight property, but nothing changed.
I also tried adding custom CSS to the report (using old school line-height: {x} pt; inside a style tag), but to no avail - that isn't supported in the SSRS environment.
Here is an example what I need - How can I achieve this?
Before:
After
Does SSRS even support this?
Edit
Converting the text to an expression and adding a double VbCrLf will not be feasible as I need to only add a partial line height
You could add an expression on the Padding.Bottom property.
=IIF(IncreaseHeight, "20pt", "2pt")
If the text is already multiple lines, format the textbox to accept HTML. Replace the line breaks with a white character in a larger font followed by a <br/> tag.
<span style=""font-size=12pt; color:white;"">|</span><br/>
If your text is all on the same line, do the above for each space in your text. Using a bar "|" should be enough to represent the space between words. If not, use a thicker character.

QTextDocument Newline handling and eliding

I am using QTextdocument and in my text there are "\n" for new line characters but QTextDocument is not handling it and it shows it as plain 1 line .
Is there any way we can make it handle "\n" as new line character, along with that I need eliding also.
So whenever any text is there after line break it should show "..."
E.g. This
is
the
Sample
Currently QTextdocument removed line breaks and shows it as "This is the sample"
2nd issue is for eliding Now suppose only 1 line is visible it should show it as "This..."
How do I achieve this?
QTextDocument holds formatted text, so you can use <br> html tag for a new line and set it's content using QTextDocument::setHtml.
Also you cab use QTextDocument::setTextWidth to set a specific width for text in the document. If the content is wider, it is broken into multiple lines and grows vertically.
About eliding you can see this bug report which is unresolved.

Arabic/English text being shuffled

I have been stocked in a strange problem
I have a text box and i am trying to read the text. But when the text box contains both arabic and english text it seems that the text is shuffled . This is how i read my text from text box:
string temp = input.Text;
This is text that i am inserting in text box:
باهم and englishمتن فارسی
And this is the text that i get from textbox:
متن فارسی and english باهم
Add RLE char at the beginning of the text.
const char RightToLeftEmbedding = (char)0x202B;
Arabic is a right to left language. English is left to right. So that actually is correct- the arabic on screen will be in opposite order (string position 0 will be on the far right).
It's probably not a problem with ASP.NET, but with the HTML that it outputs.
Inspect the HTML elements in the browser and check the "direction" property in the computed style. If the main language of your input box is Arabic or Persian, it should be "rtl", and if it's English, then it should be "ltr". If it's the other way, you need to adjust it by using the appropriate dir attribute on the HTML elements.
This only adjusts it for the user interface. The text is probably saved into your database not with the correct direction, but that may be fine, because the database is internal and usually not seen by users.

How can I read a spark TextArea implicit line breaks?

I have a TextArea where the user can enter text and also change the width and height of the TextArea. When resizing, the text is breaking where expected. I need to find where the TextArea skin added the implicit line breaks after resizing.
ENVIRONMENT
FlexBuilder 4.6
Flex SDK 4.6.0
Flash Player 11.1
EXAMPLE
This is just plain text that
breaks after the word "that".
Any ideas on how to find the position of the line break when the TextArea lineBreak property is toFit and the text has no CR or LF characters? In the example above, it would be position 28.
You can split up the text into line components and return their individual text lengths pretty easily, but you'll have to use some 'text layout framework' magic.
First access your TextArea's textFlow property (not the text property), which will return a TextFlow instance. This is a model for the text inside your TextArea.
This object has a flowComposer which takes care of the layout of the text and carries a lot of information with it.
Its type is IFlowComposer, but you'll have to cast it to a StandardFlowComposer in order to access the individual lines.
Now you have access to the lines property, which is a collection of TextFlowLine
Each of these lines has a textLength property.
So the following
var composer:StandardFlowComposer =
myTextArea.textFlow.flowComposer as StandardFlowComposer;
for each (var line:TextFlowLine in composer.lines)
trace(line.textLength)
would yield (with your example)
29
30

Resources