right-to-left

Width of string to the right of a point, in a bi-directional text

最后都变了- 提交于 2020-01-30 06:22:06
问题 *Sorry if the title is not great. I am not sure how to summarize this question into a few words. I have a DataGridView and a search box. When the user types a query, any matching result in the DataGridView cells, is highlighted. To achieve this I use the CellPainting event of DataGridView and draw a rectangle behind the results. Some of the cells are oriented Right-To-Left: And some are oriented Left-To-Right: When the orientation is RTL, I use the following formula to calculate the highlight

JScrollPanes in JInternalFrames for right to left component orientations - Java bug?

二次信任 提交于 2020-01-17 03:26:33
问题 So I have created some demo code, see below. What I am seeing is that if a JScrollPane is within a JInternalFrame and component orientation is set to right-to-left, when minmising the frame, the scroll bar stays to the left of the content. I would expect, seeing as RtL, that it would stay to the right of the content, which is true if the scroll pane is not added to an internal frame (see both frames - one appears behind the other in the demo). So is this a Java bug or have I forgotten to do

Inserting formatted numbers as text in Right to Left MS-Word document

对着背影说爱祢 提交于 2020-01-16 13:14:28
问题 I have sValA = 10/140/000 string. Need inserting 10/140/000 as text in a right-to-left document. When I performs below ThisDocument.Bookmarks("Temp_GrandTotal").Range.Text = sValA It returns 000/140/10 Any helps are appreciated. 回答1: You can add a UDF to swap the parts by a swap character. Then call it like: ThisDocument.Bookmarks("Temp_GrandTotal").Range.Text = SwapParts(sValA,"\") UDF code: Option Explicit Function SwapParts(ByVal sText As String, ByVal SwapChar As String) As String Dim

Non-Editable UITextView Left-Aligns RTL (Arabic, Hebrew, etc) Text

和自甴很熟 提交于 2020-01-16 02:11:41
问题 Using iOS 5.0+ for iPad, I have an app with containing Arabic text in a UITextView where: myTextView.editable = NO; Strangely, the Arabic text suddenly aligns to the left and not the right, causing quite a problem for user readability. I appreciate any help overcoming this strange behavior! 回答1: Solved it! Turns out it's very simple: just set the textAlignment to UITextAlignmentRight. UITextView works differently when editable and not, especially when it comes to RTL text. If the base writing

Android Spinner Set dropdown text direction to RTL

青春壹個敷衍的年華 提交于 2020-01-15 10:25:27
问题 How to set spinner dropdown text direction to rtl ? I know for regular texts we can use android:textDirection="rtl" but it does not work for spinner dropdown text. Should I implement it in popup theme? How? Thanks 回答1: Try This - Add below code in Activity Spinner spinner = (Spinner) findViewById(R.id.spinner); ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.planets_array, // android.R.layout.simple_spinner_item); R.layout.textview); // adapter

Order of string replacement function invocations when used with RTL languages

梦想与她 提交于 2020-01-14 18:48:27
问题 When calling String.replace with a replacement function we're able to retrieve offsets of the matched substrings. var a = []; "hello world".replace(/l/g, function (m, i) { a.push(i); }); // a = [2, 3, 9] In the example above, we're getting a list of offsets for the matching l characters. Can I count on implementations to always invoke the match function in ascending order of occurrence, even when used with languages that are written from right to left ? That is: Can I be sure that the result

Order of string replacement function invocations when used with RTL languages

自古美人都是妖i 提交于 2020-01-14 18:48:04
问题 When calling String.replace with a replacement function we're able to retrieve offsets of the matched substrings. var a = []; "hello world".replace(/l/g, function (m, i) { a.push(i); }); // a = [2, 3, 9] In the example above, we're getting a list of offsets for the matching l characters. Can I count on implementations to always invoke the match function in ascending order of occurrence, even when used with languages that are written from right to left ? That is: Can I be sure that the result

Flexslider and Right-To-Left language support

柔情痞子 提交于 2020-01-12 15:47:06
问题 I installed a template on WordPress that contains Flexslider. My language is written Right-To-Left (RTL). When the page is RTL, the Flexslider stops and no images appear. How can I resolve this issue? 回答1: flex slider doesn't support rtl languages. The only way to fix it is to make the div holding the slider direction: ltr On your theme, if the slider on the home page find a file called index.php find the div that's holding the slider and all this code style="direction:ltr;" this will display

NSAttributedString Writing Direction

ⅰ亾dé卋堺 提交于 2020-01-11 08:45:32
问题 I am trying to change the write direction in an NSAttributedString. However, I have a really hard time figuring out how to do it. CTFontRef fontRef = CTFontCreateWithName((CFStringRef)@"ArialRoundedMTBold", 16, NULL); NSDictionary *attrDictionary = [NSDictionary dictionaryWithObjectsAndKeys:(__bridge id)fontRef,(NSString *)kCTFontAttributeName, nil]; CFRelease(fontRef); NSAttributedString *attString=[[NSAttributedString alloc] initWithString:self.stringMap attributes:attrDictionary]; self

Right to Left (RTL) text in XWPFDocument (Apache POI)

爱⌒轻易说出口 提交于 2020-01-09 11:57:09
问题 I could not find a way to make a RTL paragraph in Docx using XWPFDocument (Apache POI) in my Java program. Here's my code that generates the XWPFDocument. XWPFParagraph title = document.createParagraph(); title.setAlignment(ParagraphAlignment.CENTER); title.setVerticalAlignment(TextAlignment.CENTER); title.setWordWrap(true); XWPFRun titleRun = title.createRun(); titleRun.setText(reportDesign.getName()); XWPFTable s = document.createTable(resultList.size()+1, columnList.size()); // declare a