Key events on the fields in the custom horizontalfield Manager

Hi all

I created the screen with a title bar and toolbar.

The toolbar is created with a HorizontalFieldManager.

Toolbar contains three BitmapField and a LabelField.

How can I manage the key events of the fields in the HorizontalFieldManager.

Where I need to override the keyChar() method.

I did something wrong here. I do not receive the dialog box by pressing the Enter key. It is moving to the next icon that's all.

I can move each icon by using the arrow keys, it is also developed. But when I press the Enter key, it goes to the next icon.

I want to show the new screen by pressing the Enter key on each icon in the HorizontalFieldManager.

How can I solve this problem... Any help...

Override KeyDown() in your screen. As:

    public boolean keyDown(int keycode, int time)
    {
        System.out.println("Enter key pressed!");
        if (icon1.isFocus())
            Dialog.inform("show page1");
        else if (icon2.isFocus())
            Dialog.inform("show page2");
        else
            Dialog.inform("show page3");

        return true;
    }

Concerning

Bika

Tags: BlackBerry Developers

Similar Questions

  • Listen to the event within the custom class

    I created a custom class that publishes on a webpage to authorize a user. How can I listen to an event within the custom class?

    It is my code in my main class.

    var customClass:CustomClass = new CustomClass();

    var testingString = customClass.authorize ("[email protected]", "password");

    the fuction "authorizes" within the customClass looks like this:

    public void authorize(user:String,_password:String):void

    {

    jSession = new URLVariables();

    j_Loader = new URLLoader();

    jSession.j_username = user;

    jSession.j_password = password;

    jSend.method = URLRequestMethod.POST;

    jSend.data = jSession

    j_Loader.load (jSend)

    }

    How can I trigger an event in my main class once the j_Loader triggers Event.COMPLETE?

    You can raise an event using the dispatchEvent() function.

    In your main class, you assign a listener to the event the CustomClass distributes when there are.

  • Rearrange the order of the fields in a custom battery Manager

    I am creating a custom handler where the content fields overlap between them (like the tabs of the file) and I want the field to appear above the other tabs when selected.

    I've been (but not all)

    • Adds an array of fields to the custom handler in their order, but during the sublayout, I put in the position and arrangement of the field first before all other fields
    • also added the index selected the Manager first, but the order of focus change.

    Does anyone know how to rearrange their display order battery? Is it still possible?

    It is only my understanding...  Not done.

    I think knowing that a Manager displays or paint the fields in the order they are added.  It will also move by default in this way.  When the focus moves, the field is painted with focus, but what this really means is that the area of the screen is redrawn.  The Manager will know which fields are displayed in the box that needs repainted and asked to be repainted.

    So if you have two fields, and they overlap, the second field is always painted on the first field, which is not what you want if the first field is in focus.

    In short, using my 'model', if you want something on top, it must be the last thing added to the Manager.

    So when the focus moves, you need to add and remove fields to the Manager.  This is not an operation that I would actually recommend.  Change of field managers in this way is 'expensive' in regard to treatment and could slow down at all, if in fact it works - I don't know how well a manager could face having the field at point removed and re added.  But this is probably the easiest option, at least the simpler I think.  The only other option I can think of involves a fancy paint treatment.

    You want to give this a go and see how you go?

  • Will be vSPhere Hypervisor key will operate the custom provider OEM ISO ESXi image?

    Hello

    I tried to download the vSphere Hypervisor 5.5 and 6.0 towers as ISOs and start on my system, or afficheraient hard drives in the systems.

    Systems are servers HP DL380 Gen9 I know are on the HCL.

    Is it permissible to use a custom provider OEM image with key vSphere Hypervisor (free)?  Or is it not OK to do it legally?

    In other words - should I take the vSphere Hypervisor ISO and customize it by injecting appropriate inside drivers so it does not work to use the free key?

    Thank you

    Big_Daddy68

    You can use the custom provider OEM image to build. No problems.

    If you extend until vcenter and connect, it will take the new keys for him can enter your CV.

  • Export document to PDF print with links to custom without increasing the "CreateResourceStream" on the resource of the custom links Manager.

    PDF export print raises no reminder (CanCreateResourceStream, CreateResourceStream) on my manager of the custom resource (ILinkresourceHandler) this driver of images at low resolution on PDF by also all other export as interactive PDF, PNG, JPEG same impression are working properly. CustomDataLink sample also have the same problem.

    Print PDF Export Export & IDML work on background medium thread only model plugin get reminders related to export PDF, but my set LinkResourceHandle implemented in user Plugin interface so I resolve my problem of implementation of the mobile LinkResourceHandler, new model plugin.if you want it to be in the user interface pligon only that put a name of empty text file "DisableAsyncExport" in the content folder inside the app on mac OS , this will disable the export PDF & IDML background.

  • OPM does not have the custom function Manager

    1. I have manually created an 'include' file in the 'Development' folder and add it to the project in the OPM.
    2. I put the program manager JAR in the "include" folder
    3. I created "" MyProject - config.xml "and place it in the"include"folder."
    4 OPM charge MyProject - config.XML when I generate the project. I found this by making the XML invalid, and OPM has complained about this.
    5. When you debug the project, OPM says:
    A custom function "isValidSPId" has been called and there is no custom function Manager. Choose a DLL and a class to provide a custom functions for this one.


    And I chose "Java" as a platform for the project properties.

    5. When you debug the project, OPM says:
    A custom function "isValidSPId" has been called and there is no custom function Manager. Choose a DLL and a class to provide a custom functions for this one.

    The debugger expects a function custom .NET, not a custom Java function

    And I chose "Java" as a platform for the project properties.

    I'm not sure what you mean - there is no such thing as a platform of modules - all rulebases are platform independent. Do you mean the setting of "Regression Tester - platform properties? If so, these effects only the platform used to run regression tests - not for compiling, debugging, or running with or without screens.

  • Click event to the custom Manager?

    Hello

    I have set up a Manager personalized to display content in the vertical field Manager. It is an alternative to listfield because I wanted heights of different lines. So, I put in place of custom line and the row is added to the Manager of verticalfield.

    Now, I want to have click event to track which line in the verticalfieldmanager was clicked. How can I go about it?

    crush navigationclick on the Manager.

  • Adding videos to a site. the best way to get the best result (for the customer)

    Hi all


    Here's a new question, I asked myself.


    I have to add some videos to the website of the client. Short. About 15-30 MB each.

    So we will not have to wait forever for them to start playing, it is best to:


    1. Load them all with the rest of the web site in two different formats, so they will play on most of the browsers, then use a video widget in Muse.

    Of course, creating a massive gigantic site.


    2. Create a channel private on Utube, download all here paste them the youtube ID in a youtube Widget in Muse?


    3. Another way?


    Also is there a scrolling effect method so let's say the video is at the bottom of the page and it will only start when through us it.

    Kind regards

    M

    YouTube or Vimeo.

    These 3rd party services are free, they have a fast hosting, they work on all devices and browsers, and the customer can manage/edit video easily.

  • When the Manager of the custom function in a configuration of link file gets error?

    The question she get error when the Manager of the custom function in a config file in the plan to include the link.
    When she went to join the custom function Manager in the debugger, everything is OK.

    <? XML version = "1.0" encoding = "utf-8"? >
    < configuration >
    < custom function platform = "DotNet".
    library-path="G:\RB1\Include\CustomFunctions.dll".
    Class="Viking.CustomFunctions.CustomFunctions"/ >
    < / configuration >

    THS, category and path is correct.
    So is there any problem for < custom function platform = "DotNet"?

    OPA version 10.2

    OPA error message translated from the Germany into English: Exception has been thrown by the target of a call

    In general, you should not give the full path of the custom function, it should be rather in relation to the project include file.

    for example:

    and then make sure that the CustomFunctions.dll file is copied into the project folder until the project is built.

    In addition, if you use 10.2 for a new project, the mechanism that you use is now replaced. An extension of the custom function is the new thing, and it will look much nicer when it is used in the rules. Refer to the section 'Write a Custom function Extension' in aid of developer for more information.

  • Cancel key event is not sent immediately

    It is a question for the gurus of management of key events. The problem I have is this: I have two containers A and B which are side by side and are equal in size and shape. If a finger touches the first A container, a touchdown event is generated on A. As your finger moves on a container, then touch MOVE events are generated. When the finger leaves container and begins to touch the container B, touch MOVE events are generated on B. When the finger is released during a B, CANCEL button is generated A and then b. touch UP

    Is it possible to receive on A CANCEL key as soon as the finger stops to touch a container?

    Thank you!

    On further investigation, I found a better solution that uses the onTouchEnter and the onTouchExit. As soon as the press finger leaves A container, onTouchExit is issued. As the finger enters container B onTouchEnter is issued. When the finger is released during a B, only editing event is released.

  • How to manage touch event in the field

    Hello

    I created field checkbox custom, when am touch event for her manipulation, emphasis is gettting inside, and when I try to click on any other components such as the box native, afer by unchecking the custom check box, the custom box is clicking again.

    How to handle this?

    Thank you

    Rakesh Shankar

    There are certain basics that one needs to understand to effectively manage key events:

    (1) touch events are sent to the field currently has focus and the enveloping managers, including the active screen.

    (2) default response of the system to the event down is to divert attention to the field to the position of touch If there is a focusable it. If there is no focusable point touch field, the field currently has focus is unchanged. There's no "unfocus everything ' method in BlackBerry (there might be, but it is not readily available - there is a protected method focusRemove, but it is supposed to be used in conjunction with a later focusAdd protected in cases where the field has changed its focus rectangle - a classic example is any input field or text such as EditField or RichTextField view)

    (3) the default action of TouchEvent.CLICK is to call trackwheelClick (which, by default, invokes navigationClick) which is a great way to ensure consistency between the 'clicks' and clicks touchpad screen. The same is true for unclicks finally managed by navigationUnclick.

    If you want to disable the click by default if the key is outside all focusable fields and will not disrupt the rest of the system, just return true if the event is to CLICK, but the contact details are outside the scopeand actions super.touchEvent otherwise. And keep your return true; on all UNCLICK events: it's a good idea if you don't want to see the context menu from appearing each time or field click reaction called twice.

    The example of Peter was written when I've heard most of it already, but now I realize that you can do a lot easier. See part highlighted the previos section.

    Good luck!

  • Two sliders in the custom field definition

    Hi guys,.

    First of all, I want to thank all those who helped me to this day. This forum has been essential for blackberry dev work I do, and I would be screwed without you guys. That being said, I'm having a problem. I install a custom like this text entry field.

    (1) creates a vertical field Manager, assigned a background and resized image with setExtent(). (works fine)

    (2) created a new type of field and inserted in the vertical field Manager to make native look (almost works)

    The problem I have is that two sliders are appearing. Cursor #2 is dynamically updated as it should be, but the #1 cursor seems to be a "flawed slider. Please see the image below for details.

    The custom field is defined using the following code. If I remove the custom field, or cursors comes, so I am positive that it is the source of the problem.

        public class JustifiedEditField extends HorizontalFieldManager implements FieldChangeListener {
            BasicEditField ef;
    
            public JustifiedEditField(long style) {
                super(USE_ALL_WIDTH);
                ef = new BasicEditField(style) {
    
                    protected void onDisplay() {
                        setPosition(10, 17);
                        update(0);
                        //invalidate();
                    }
    
                    protected void update(int d) {
                        super.update(d);
                        setPosition(10, 17);
                        //invalidate();
                    }
    
                    protected void paint(Graphics graphics) {
                        graphics.setColor(Color.WHITE);
                        getFocusRect(new XYRect());
                        drawFocus(graphics, true);
                        super.paint(graphics);
                    }
    
                    protected void onUnfocus() {
                        invalidate();
                    }
    
                    protected void onFocus(int direction) {
                        invalidate();
                    }
    
                    /**
                     * Intercepts ESCAPE key.
                     * @see net.rim.device.api.ui.component.TextField#keyChar(char,int,int)
                     */
                    protected boolean keyChar(char ch, int status, int time) {
                        switch(ch) {
                            case Characters.ESCAPE:
                                // Clear keyword.
                                if(super.getTextLength() > 0)
                                {
                                    setText("");
                                    return true;
                                }
                        }
                        return super.keyChar(ch, status, time);
                    }
                };
                add(ef);
            }
    
            protected void sublayout(int width, int height) {
                super.sublayout(width, height);
                setExtent(width, 57);
            }
    
            public BasicEditField getEditField() {
                return ef;
            }
    
            public String getText() {
                return ef.getText();
            }
    
            public void setText(String value) {
                ef.setText(value);
                invalidate();
            }
    
            public void setChangeListener(FieldChangeListener changer ){
                ef.setChangeListener(changer);
            }
    
            public void fieldChanged(Field field, int context) {
                invalidate();
            }
        }
    

    I am totally stuck on this issue, any help would be really appreciated. TIA!

    I came up with an alternative solution. It turns out that I can use a transparent border to set the offsets to where the edit field must be located within the input Manager; thus eliminating the need to use setPosition.

  • I want to send an email manually with the fields email drives custom object? Is this possible?

    I want to send an email manually with the fields email drives custom object? Is this possible?

    Hey,.

    Yes, however, the object record Email custom fields only fill with default values. For the custom field object Record is filled, it must be sent via the event Actions or a generating program so that he knows in which case it is associated.

    Thank you...

  • Someone removed the custom attributes field

    Is it possible that PowerCLI can fire an event if someone removed the field of the custom in vCenter attributes?  I take more precisely on the class in Administration > custom attributes in vSphere client 5.x.  For some reason a field that he had to show VM assignments is missing, and I'll try to find what happened to her.

    Course, use the CustomFieldRemovedEvent.

    You can use the Get-VIEvent or my Get-VIEventPlus cmdlet to retrieve the events.

    BTW use my Event-O-Matic to easily find event names.

    Special Edition, it will still generate code to extract the events

  • Automate snapshots based on the custom field

    I am a newbie to scripting and can't creating a Powershell script that will automatically create snapsht based on a custom attribute that is specified on the virtual computer. I got so far:

    Get - VM | Select the custom name fields - ExpandProperty | Where {$_.value - eq "takesnapshot"} | Select name

    This gives me a list of virtual machine names that have the specified "takesnapshot" custom field, however, I don't know how to use the output with the Get - VM | New snapshot command to create a new snapshot. Any help would be appreciated.

    OK, the key is "Ministry" and the value is "instant".

    With the attached line, you should get in the market.

    Your test had a few typos: it should be $_ and you should leave out the test to white before the brackets.

    ____________

    Blog: LucD notes

    Twitter: lucd22

Maybe you are looking for

  • DV6-7014nr: no drivers or software not listed on HP Support for dv6-7014nr

    26 July 2016 there is no drivers or software listed on HP's Support page for my dv6-7014nr product. There is a message- We were able to find the drivers for your product. Pilots may be developing, so please, check back at a later date or visit the pr

  • iBooks crashes immediately on startup

    After a clean install of OS X 10.11.3 El Capitan, I can no longer start iBooks as it crashes immediately: Process:               iBooks [2980] Path:                  /Applications/iBooks.app/Contents/MacOS/iBooks Identifier:            com.apple.iBoo

  • Remove a switch by a fireplace

    Hello I removed a pile of 4 switches and renumbered the remaining members. However, I don't see how to remove the entries of pile of sh run. Can anyone tell how to proceed? See you soon,. Huw Slot 1/0 9! Dell network N2048P slot 2/0 5! Dell network N

  • . BUP FILES

    Cannot open a file in Windows Media Player STATES file has an extension (.) BUP) not recognized by Windows Media Player.

  • Error: User authentication failed - when you plug the device in momentics

    Hi all I am not able to connect the device (Z3) to momentics for deployment and debugging. Where I am able to connect Z10 and DevAlpha C. My SDK version: 10.2 Version of the device: 10.2.1.3175 (S/w version 10.2.1.2941) Thank you Sumi Ghosh