is possible to create a text with click action (like a Action link ) in blackberry mainscreen? - blackberry

This is seems like a pretty simple question. Is it possible to set a custom action for a text link (those blue texts that are underlined) inside mainscreen in blackberry. In other words, is it possible to have a handler do something on an event like feildchangelistner on the text?
thanks

Yes, the various fields that display text are children of the class field
As you can see from the doc you can override navigationClick, unclick. You may also set the font as one that is underlined and override the default color in paint. You will also need to code touch events if you are supporting the older touchscreen devices (Storms OS5 and below)
I would advise against doing any of this because RIM provide a class that seems to fit your exact needs in the advanced UI pack. Take a look at HyperlinkButtonField

Related

Make bullet/num/check lists in UITextView

I am working on text editor app and using UITextView for this. Does anybody know how to make ability to do bullet/num/check lists in it? Any examples/tutorials?
Note: I need to do this as a part of text editor, so user can select some area, tap on according button and enable/disable lists formatting.
Based on my research for similar behavior (e.g. Bullet list and Numbered list in UITextView ), I would expect that there is no easy way to do it. I expect that you will have to use textView(_:shouldChangeTextIn:replacementText:) to hack currently added text to manually add bullets/numbers - e.g., if the user set that she currently wants to use unordered list, you will have to detect a new line added in shouldChangeTextIn and manually add there the bullet and indentation.
Another approach which you might consider (its applicability depends on your requirements) is to customize existing open source rich text editor. In my case I was able to get close enough to what I needed using RichEditorView, which uses HTML+CSS as an underlying technology (so to be able to do customizations, you need to know a bit about JavaScript, CSS and HTML).

Delphi TListBox iOS making new itemstyle/behavior

I need to show custom data. For example I need to show a contact list with name, description, photo. And ideally I would also like to show custom data there, e.g. a button to launch telephone call. The default styles do not quite do what I want, but fairly close.
Thus, as far as I can tell, TListBox could be a decent control for this if I could create custom styles? Is that possible? (Anotther problem of course is setting the values of the custom data controls.)
You should take a good look at the FMX CustomListBox example AFAIK even the example alone already seems to have exactly what you need, already set in place.
It took me about 10 minutes to produce this result straight out of the CustomListBox example with your description:
One thing that the included FMX example demonstrates perfectly is how easy it is to add any FMX control to the ListBox via the TStyleBook Layouts such as buttons, images etc... basically any visual control upon which you then implement the HitTest, again, all very detailed in the FMX Delphi example.

Event listeners for a UITextArea ios

I have been trying in vain to try to find how to add listeners to text area.
What I am basically trying to do is create a rich text editor where I can let the user comment on a particular item.
For this purpose I am using a text area. If you have any other suggestion please let me know.
On another note, I have not seen that there is text did change or related functionality for the textarea. Is there a way we can build it ourself?
What you are looking for are the UITextViewDelegate's. Have a look at http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UITextViewDelegate_Protocol/Reference/UITextViewDelegate.html
EDIT
Per our chat the tutorial you are looking for to also ad a done button above your keyboard can be found at http://gabriel-tips.blogspot.com/2011/05/input-accessory-view-how-to-add-extra.html

Delphi Application.HintColor

In Delphi 2010 (don't know about other versions) Application.HintColor seems to have no effect when running on Windows 7. On XP it gives the desired color. Any workarounds for this?
HintColor is like some of the other *Color properties in the VCL in that if you are running a themed application on a themed OS, they may be ignored when painting the control. Hints are a little different, because for them it's Vista or above, not XP or above. You can see this if you look at THintWindow.Paint in Controls.pas - it specifically paints the Vista gradient background if it's Vista and if themes are enabled.
This is normally a good thing, because you want your application to fit the look-and-feel of the OS and the user's preferences.
If you really want to override this, you will need to:
Subclass THintWindow
Get your application to use this new hint class when showing hints
In this class, override the painting methods to draw as you wish
Create a new hint class descending from THintWindow somewhere (more on what to implement below.) To get the application to use your new class for hints, assign an event handler to TApplication.OnShowHint (the easiest way to do this is via a TApplicationEvents component on your main form) and change the HintInfo parameter's HintWindowClass field to be your new class.
In your new hint class, you will need to override Paint and NCPaint. NCPaint will paint the border, and you will want to paint a non-themed border (probably using DrawEdge.) Change Paint to fill in the background with your colour of choice, and then draw text using DrawText in the hint's rectangle with appropriate text wrapping and alignment flags. If you look at the VCL code closely you can see a couple of rectangle offsets hardcoded, and you probably want to mimic these to get the same rectangles in your code as the VCL uses.
You can make all sorts of interesting variations of hints using this technique. One I made recently changed the painting so it drew a bold caption and then had other information under that, for example.
Finally: why are you setting the colour? Is it to warn the user of something or provide some other feedback? If so, consider using more than the colour - you can change anything you want about a hint using this technique. Try painting a warning icon or using rich-formatted text instead. I'd recommend you try to keep to the general theme look, and code tweaks to the themed painting, not overriding it entirely, because unless there's a very good reason you should try to keep to the OS / look the user has chosen.
No, not directly. If you have the runtime themes enabled it will take the system color for the hint. (IOW, the hint will be 'themed'). It is like setting a color for a button with the themes enabled (given that you can do this).
However you can use other 'hint' engines. For example you can use TjvBallonHint and/or TjvDesktopAlert (perhaps in conjunction with TjvDesktopAlertStack) from JEDI's JVCL which is free. There are also other (free & paid) alternatives. Also, if you want you can implement your own hint window.
HTH
Turning the 'enable runtime themes' off makes it work.
In Delphi 2010, you have TCustomHint class. You can derive a new class from it which draws a new type of hint.
You can assign your new class to CustomHint property of your forms or any other controls, and Delphi will use your custom hint class for showing hint for that control.
You can check source code of TBalloonHint class which is a sample TCustomHint descendant in Controls.pas

How can I use the default dialog icons in my custom Blackberry popup dialog?

I'm writing a custom dialog window to display the status of a long operation, and would like to use the little timer icon (the little square clock on OS >= 4.6) that's used in the BB native dialogs.
How can I use this graphic within my dialog?
I'm already familiar with layout managers and such, I just don't know where the bitmap is, or if there's an API call to get the default theme icons like this.
Under the Bitmap class there's an HOURGLASS constant defined that can be used with the getPredefinedBitmap() method.
Example:
Manager.add(new BitmapField(Bitmap.getPredefinedBitmap(Bitmap.HOURGLASS)));
This was pretty well hidden within the javadocs, so I figured I'd answer my own question in case anyone else needs to know.

Resources