Hi i want to create a login form in blackberry,
I have taken the username and password from the user but i want the username and password to appear inside the round rectangular text box.
But I am not able to draw a round rectangle
Any help?
On BBOS 4.6 and later, you can create a net.rim.device.api.ui.decor.Border object and pass it to a field's setBorder() method. Look at the net.rim.device.api.ui.decor.BorderFactory class to help you construct Border objects, such as with one of its createRoundedBorder() methods.
Related
I need to write some text in openLayers 3... Not a label, something like a text object, that I can select and drag around the map. This text must have multiple lines.
I tried to use a point with ol.style.text, but it isn't multiline.
I also tried the popups, but I need the text to be always displayed.
Is there any way to use a text feature for this (ol.format.TextFeature)?
Is there any object that I can use for that purpose?
Thanks!!
You can use an ol.Overlay for that. An overlay is basically anything an Element can be. It has a position an positioning that can be set at any time.
See an example: http://openlayers.org/en/v3.9.0/examples/overlay.html?q=overlay
You could use map browser events (pointerdown, pointerup) and if the target is your overlay element then you could move it around and update its position.
I am using QuickDialog to create a form in my iOS app. For one of the items that I am asking users about, I would prefer a multi-line text field as it's an open-ended question (e.g., do you have any questions?). QEntryElement only has a single line, and the space to type is pretty small on an iPhone. Any suggestions for how to do a larger text entry space using QuickDialog?
Instead of QEntryElement, use QMultilineElement. It works exactly the same way - the only problem being that QMultilineElement does not display what the user entered on the main form screen.
I have an application requirement where user chooses color & font for title, labels, textfields. Images for logo, etc.
Here is the brief scenario:
Some screen which provides base application use
Settings screen, where user can update UI: Here I have provided textfields where user can enter color schemes for all provided labels and image selection.
For example, Line color, Line Shadow color, Font Color, Divider Color. User input will be R,G,B values (like, 123, 255, 89)
Once user save this configuration, entire application UI should be changed for all the viewControllers accordingly.
What would be the preferable way to achieve this?
I do already have all the IBoutlets for each and every label, textfields, imageviews. - Just FYI.
Thanks in advance for help.
The simple, non-complicated way of getting this working is to store all these choices in NSUserDefaults - and have all the customisable controls draw themselves using the property settings there.
I'm looking for a way to insert emoticons/smileys/any bitmap in a text field (LabelField, EditField, whatever). From what I've researched so far, there is no direct way to do this, so I'm stuck with trying to simulate this behavior.
I was thinking of using a normal text field and instead of smileys to insert blank spaces and then place some BitmapFields over the text field where the smileys should be. The problem is that I have no reliable/quick way of finding a character's position on screen (x,y).
Can you give me some ideas?
Can you think of other approaches to this problem?
I'm sure a lot of people encountered this kind of problem at one time or another. I hope there is someone who managed to find a solution. I'm desperate enough to accept any solution, no matter how crazy/complex/difficult.
Also, I would like to use this in SDK 5.0 and up, but I will settle for only 6.0.
What you might be able to do is create a custom Manager that is a container for EditFields and BitmapFields. When the user clicks in the initial EditField that is inside of your Manager and begins typing, you let them type until they want an emoticon. When they select it you create a BitmapField right after the EditField and then place a new EditField to the right of the BitmapField. You'll have to keep track of things like when the user hits backspace and empties an EditField, it should be removed, and then they are selecting the BitmapField, and a subsequent backspace would delete the BitmapField and put focus on the previous EditField.
You will have to also create your own EditField that you can control the size of, and BitmapField that allows for backspace to delete it.
As far as I can think ahead, you shouldn't have any problem using this for 5.0
Edit for comments:
You'll have to be implementing your own sublayout() of your Manager in any approach you take, so you know positions because you're the one who put them there. If you want to want to do multi-line (my approach was for single-line), you can do one of three things:
1.) Just have new EditFields for each line and do the linking the same way I talked about where backspace drops you to the previous Field, in this case the last line. You have to keep measurements of how big the field is based off of the text, and see if that will move it to the next line. If it does just adjust where the EditFields are positioned.
2.) You can do your image placement in the multi-line field by implementing your own EditField that expands height, in which case you'll know where the text is and what lines you are on. Drawing the Bitmap would be a matter of calculating (what line number you are) * (font height) and getAdvance(text_up_to_bitmap).
3.) Implement your own EditField where you have a focusable Manager that you manually do all of the drawing. You can parse a String that you save from capturing key strokes and maybe have a flag where an emoticon should be. Draw the text before it, draw the emoticon, then continue drawing the text. The difficulty with this is you will have to do things like determining where the cursor should be, bringing up the virtual keyboard, and handling some of the other tasks that the EditField does for you.
I need to create a custom gauge field which looks slimmer like a Blue thin line filling in.
Any ideas/resources?
There aren't any native BlackBerry controls, but you can create your own custom field and implement a paint() method that draws the gauge using Graphics.fillRoundRect().