Right-to-left language in Blackberry - blackberry

I am writing an application which requires me to identify text in arabic language and create a small progress bar that moves from right to left telling the user where exactly he is.
Two things:
1) I don't know how to make a progress bar move from right to left
2) if at all I am planning to use Fillrect, I want to identify if there is a text else don't fill rectangle.
For English text, we can do a character count but for foreign language how can we make out if the LabelField contains text or not

Related

Swift UIButton edge insets

I am trying to make a square button that is on the smaller side (30x30), and I want to include the amount of participants there are as the text, for some reason the button is cutting the title off on the left and ride sides (see picture) forcing me to either have a bigger button (not ideal) or have really small text (also not ideal). Is there a way to stop it from cutting off?
If you're trying to display one character in that 30*30 button, make the button size large, check screenshots for reference:
Change Button Style Plain into Default.

How to implement a UITextView screen for massive text input

I need to implement a screen where the user is able to write an Application Letter for a job position.
The main idea is to have a UITextView where the user writes what he wants, with a character limit, and the current writing area is visible.
I want the all view to scroll up under the top bar, not just to scroll inside the UITexView.
Like this:
I also want to implement a Markdown parser for the final text and a keyboard shortcut for Markdown, any ideas on how to implement that?
In order to implement keyboard shortcut - you have to write your own keyboard in this case, because normally you cannot influence on the keyboards appearance, except of change it to black color.
About markup - you are here on your own again, as you have to look for already made solutions to parse it properly.
As for the UITextView - no problems here, just stick it up to the edge of the screen in interface builder with constraints and then it will be just as you would like it to be when you have UINavigationBar on top.

Method to display UILabels and UIButtons Inline with each Other

In my app I have a "summary" paragraph that based on data an user actions in the app changes what it displays. The issue is it displays both regular text and clickable text (like a button) in the same sentence and line. The app will have a series of if else statements and based on the results of these the text that will be displayed is determined, but how do you make some of the text a button tied to an action and some of the text a plain label? Any and all help is appreciated!
In iOS 7, buttons look like blue text. I would suggest taking advantage of that fact.
I would use AutoLayout, and create your fields with constraints that put a very small amount of space between each label and button in your line of text/labels, with a vertical constraint on all of them that aligns their leading to match.

Space characters not displaying in TextView until another character is typed

I have a couple of UITextViews in a custom UITableViewCell that I have set to right justify text that users enter. However, it currently doesn't display spaces on their own. In other words, if you type "Hello World" (with five spaces between the two words) the spaces won't appear until the W in world is entered. Not sure what could be causing this. Thanks for your time.
This is normal. You will see this behavior in text fields in most Mac apps as well as iOS text views. You will see this even when the text is left justified. As you reach the right end of the text area, typing a bunch of spaces doesn't do much until you type some other non-space characters.
When you have right-justified text, the cursor is always at the right side of the text view so you always see this behavior.

How to offset the position of the cursor in an edit control?

I'm building a custom edit control which consists of adding both an icon at the left and an icon button at the right, both inside the edit control. This requires shifting the starting point of the text (and cursor) to the right by X amount of pixels. This also means I need to 'Limit' how wide the text can be drawn too, to make room for the button on the right. The intention is to provide both a custom icon on the left, such as in a browser, as well as an 'X' button on the right to clear the contents of the edit control.
How to offset the Rect of where to draw the text and cursor in a TCustomEdit descendant?
If you are using more recent version of Delphi, there should already be a TButtonedEdit Control and can do your work.
If not, I think you can send a EM_SETMARGINS message to your TCustomEdit to set the left and right margin.
SendMessage(CustomEdit.Handle, EM_SETMARGINS, EC_LEFTMARGIN or EC_RIGHTMARGIN, MakeLong(LeftMargin, RightMargin));

Resources