Arabic/English text being shuffled - asp.net

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.

Related

Truncate label text from the left

I have a Label that displays the full name and path of the file that the app is currently processing.
The way Labels perform text truncation, the "C:\..." part of the path is always shown, while the actual file name is only shown if it fits. I would rather truncate on the left side, so that the file name is always shown, while the "C:\..." part is only shown if it fits.
Is this possible in Xamarin Forms?
If you read the docs these are the options for truncation
HeadTruncation – truncates the head of the text, showing the end.
CharacterWrap – wraps text onto a new line at a character boundary.
MiddleTruncation – displays the beginning and end of the text, with the middle replace by an ellipsis.
NoWrap – does not wrap text, displaying only as much text as can fit on one line.
TailTruncation – shows the beginning of the text, truncating the end.
WordWrap – wraps text at the word boundary.
HeadTruncation appears to be what you're looking for

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.

Respect space in code but ignore with CSS?

With CSS can I make a browser ignore the character but respect normal white space?
So this:
Some text More text
Is displayed like this:
Some text More text
Not:
Some text More text
UPDATE There is actually more white space in my code. I need the default behavior where extra white space doesn't get rendered on the page so I dont think I can use white-space: pre or pre-wrap
So this shouldn't be excessively indent before the initial word.
Some text More text
I don't think there's a pure CSS way of doing that, since is an actual character that is different from the whitespace created by the spacebar in a text editor (what gets ignored by HTML renderers). However, depending on how those are appearing, you may be able to use a script that searches for and removes that character wherever it sees it.

Fitting the label text of tab widet Qt

I have a tab widget with two tabs in it in my Qt application. When I set the label text for a tab to a long word like 'Difference', some of the text goes out of the boundary of the tab and is not shown. How do I fix this so that the entire label text fits exactly in the tab?
Thanks,
Rakesh.
Qt receives that style from OS. By default on Windows text isn't truncated. You can set it manually using
QTabWidget::setElideMode( Qt::ElideNone );
I think elideMode would be helpful for you.
Try setting the value to Qt::ElideNone which will not show the ellipsis in the text, so I am guessing it might show the entire text.

textinput box with inline image

Is there any way to create a textInput box for flex mobile with inline image without using textflow ?
Basically i need a text input component , so that user can just use it as normal text input box but to it images can also be entered inline with text. To enter images user can select the image from list and that image will get inserted at the current cursor position.
If you look at any platform, there is no user experience (as far as I've seen) that lets you add images in the text input box. It's always been straight text, except for android which replaces certain text with icons (like :-) becomes an android icon). I don't think your users would expect that behaviour. If you really do need it, I would recommend you create a custom skin for your textinput box and add that feature into it, but it won't be easy to do.

Resources