Multiline ButtonField

Is it possible to add more than one tag-line to a Buttonfield?

Looking for some time, but was not able to find sth. similar...

dognose

You must override the method object and draw two or more lines of text via graphics.drawText)

don't forget to call the super.paint (before).

Tags: BlackBerry Developers

Similar Questions

  • When you make thunderbird with multiline topics pane?

    When you make thunderbird with component topics multiline, like Outlook or Geary?

    I think the Bug 441414 refers. Work has recently resumed, but when he sees the light of day is anybodies guess.

  • Multiline center text

    How to center the multiline text?  I have a basic title and I typed in just one line, all looks good, focused correctly. Then I add another line to this text and what is more centered. The first line centered but stayes new line appears underneath and the top line is not upward to accommodate the new line to keep all the centered text.  Is it possible to do instead of the eye?

    According to the number of rows you need and how big do and how great the chassis, I usually do this by moving the base line. Eight lines something like 200 for the HD to the default size, four lines earlier, four below the baseline.

  • Multiline - Regular Expression Match string

    I'm trying to understand the format of a regular expression to pull select off multi-line string lines and fill in these lines as the individual elements of an array of strings using regular expressions to Match. The total length of the multiline string may vary as well as the text in the string. The string can contain letters, numbers and special characters. I've attached an example VI. In the example of VI, I want to only return lines starting by "device #" in the table. The number of lines starting by "device #" can vary, but I want to capture them all.

    Or is there a better functioning to be used instead of the corresponding regular Expression that will give me the desired result?

    aaronb wrote:

    I'm trying to understand the format of a regular expression to pull select off multi-line string lines and fill in these lines as the individual elements of an array of strings using regular expressions to Match. The total length of the multiline string may vary as well as the text in the string. The string can contain letters, numbers and special characters. I've attached an example VI. In the example of VI, I want to only return lines starting by "device #" in the table. The number of lines starting by "device #" can vary, but I want to capture them all.

    Or is there a better functioning to be used instead of the corresponding regular Expression that will give me the desired result?

    Corresponding regular expression works well for this.

    Ben64

  • Multiline ToolTip

    I can generate a single line ToolTip, but I meet without success, producing a multiline ToolTip.  Any suggestions?

    Hi jrbecker,

    In LabWindows/CVI 2012, you can create multi-line ToolTips in one of the following ways:

    • Insert a newline character (\n) in the chain of the ATTR_TOOLTIP_TEXT attribute.
    • Insert a newline character (\n) in the field ToolTip text string in the browser of the attribute.
    • Click the arrow in the ToolTip text of the attribute browser field and select change the text ToolTip multiline.

    http://zone.NI.com/reference/en-XX/help/370051V-01/CVI/uiref/tooltipsoverview/

    If there is an update, we can do the documentation that can help make that task easier, please let me know!

    April

    Technical writer

    LabWindows/CVI

  • Remote PC stops responding when the lines are added to a multiline textbox

    Hello

    When connected two RDP connections and multiline textbox is visible and always up-to-date (e.g. time real record on the screen), then all other processes and threads are suspended on the remote PC. For example, the task manage does not refresh, the clock stops, if you have a few applications running on this PC Server/services so their customers will get the writing/connect timeout errors, etc.

    to reproduce this problem:

    1. create a test application simulating recording in real time on the screen. For example, create a new GUI application (for example, in visual basic, delphi, etc.), several (for example six) textbox, control and set multiline = true (or use TMemo components in delphi), add the button and code to add rows in a loop (for example 200 iterations) these textbox/TMemo controls (see the sample code below). Build the executable

    2. have three PC of loan. The first connect to second via RDP and from there linking to third parties via a second RDP connection. Third PC start test application, that you created in step 1. While the lines are added to the multiline/TMemo text box, try to do something with this PC, for example open the Task Manager, check how it is refreshing, open clock and note how seconds are proliferating, try to connect to some services from another PC (shared disk for example, ftp, web, etc.) and see how to answer they are

    Windows 2000 seems to be ok, xp, 7, Server 2003/2008 have some problems

    is there something that we could do to make the third-party application with real-time logging to the multiline/TMemo text box does not slow down or suspend our services that are running on the same PC, when someone connect via RDP? also, it would be great if microsoft could fix this problem

    example code:

    For i As Integer = 1 to 200
    Dim s As String = «»
    J As Integer = 1 to 10
    Convert.ToString (i) & s = s & ""
    Next J
    TextBox1.AppendText (s & Chr (13) & 10)

    J As Integer = 1 to 10
    Convert.ToString (i) & s = s & ""
    Next J
    TextBox2.AppendText (s & Chr (13) & 10)

    J As Integer = 1 to 10
    Convert.ToString (i) & s = s & ""
    Next J
    TextBox3.AppendText (s & Chr (13) & 10)

    J As Integer = 1 to 20
    Convert.ToString (i) & s = s & ""
    Next J
    TextBox4.AppendText (s & Chr (13) & 10)

    J As Integer = 1 to 20
    Convert.ToString (i) & s = s & ""
    Next J
    TextBox5.AppendText (s & Chr (13) & 10)

    J As Integer = 1 to 20
    Convert.ToString (i) & s = s & ""
    Next J
    TextBox6.AppendText (s & Chr (13) & 10)
    Next I

    var
    i: Integer;
    s:string;
    Start
    for i: = 1 to 200 start
    s:='';
    While length<20 do="" s:="s+intToStr(i)+'">
    glMemo1.Lines.Add (s);

    While length<40 do="" s:="s+intToStr(i)+'">
    glMemo2.Lines.Add (s);

    While length<60 do="" s:="s+intToStr(i)+'">
    glMemo3.Lines.Add (s);

    While length<80 do="" s:="s+intToStr(i)+'">
    glMemo4.Lines.Add (s);

    While length<100 do="" s:="s+intToStr(i)+'">
    glMemo5.Lines.Add (s);

    While length<200 do="" s:="s+intToStr(i)+'">
    glMemo6.Lines.Add (s);
    end;

    Thank you
    Paulius

    http://social.technet.Microsoft.com/forums/en-us/itproxpsp/threads

    you might do better at the forum above. Good luck. :)

  • Avoid the popup on click ButtonField

    Hey guys, rite, I've been looking for centuries now, and the problem I have is that I can't seem to stop the popup to appear, I looked through the forums and although there are a lot of things tell me how to do it, none of them seem to actually tell me how to stop the menu go up when I click on a button.

    I can get the menu to not appear, but then the button does not work.

    Its getting on my nerves now cus its pretty well the last thing I have to do on the entire application.

    Thanks in advance

    Howard

    Add CONSUME_CLICK to the style of the ButtonField.

  • Add ButtonField on BitmapFiled

    Hi all

    I tried to use this code to add BitmapButtonField on BitmapField but I couldn't use it.

    Ant one can help me?

    package mypackage;
    
    import com.operations.images.ImageManipulator;
    
    import net.rim.device.api.system.Application;
    import net.rim.device.api.system.Bitmap;
    import net.rim.device.api.system.Display;
    import net.rim.device.api.system.JPEGEncodedImage;
    import net.rim.device.api.ui.TouchEvent;
    import net.rim.device.api.ui.TouchGesture;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.BitmapField;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.component.SeparatorField;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    
    /**
     * A class extending the MainScreen class, which provides default standard
     * behavior for BlackBerry GUI applications.
     */
    public final class MyScreen extends MainScreen {
    
        private static int rotatedAngle = 360;
    
        // byte[] rrr = resizeImage(Bitmap.getBitmapResource("gear.png"),
        // Display.getWidth(), Display.getHeight() / 2);
        // Bitmap originalBmp = Bitmap.createBitmapFromBytes(rrr, 0, rrr.length, 1);
        Bitmap originalBmp = Bitmap.getBitmapResource("[email protected]");
        BitmapField rotatedBitmap = new BitmapField(originalBmp);
    
        private BitmapButtonField buttonField1 = new BitmapButtonField(
                Bitmap.getBitmapResource("images_1.png"));
        private BitmapButtonField buttonField2 = new BitmapButtonField(
                Bitmap.getBitmapResource("images_2.png"));
    
        VerticalFieldManager bmpManager = new VerticalFieldManager(USE_ALL_WIDTH
                | NO_HORIZONTAL_SCROLL | NO_VERTICAL_SCROLL) {
    
            public int getPreferredHeight() {
                return rotatedBitmap.getHeight();
            };
    
            public int getPreferredWidth() {
                return rotatedBitmap.getWidth();
            };
    
            protected void sublayout(int maxWidth, int maxHeight) {
    
                layoutChild(rotatedBitmap, originalBmp.getWidth(),
                        originalBmp.getHeight());
                layoutChild(buttonField1, buttonField1.getPreferredWidth(),
                        buttonField1.getPreferredHeight());
                layoutChild(buttonField2, buttonField2.getPreferredWidth(),
                        buttonField2.getPreferredHeight());
    
                setPositionChild(rotatedBitmap, 0, 0);
                setPositionChild(buttonField1, 0, 50);
                setPositionChild(buttonField2, 50, 50);
    
                super.sublayout(getPreferredWidth(), getPreferredHeight());
                setExtent(getPreferredWidth(), getPreferredHeight());
    
            };
        };
    
        VerticalFieldManager manager = new VerticalFieldManager(USE_ALL_WIDTH
                | NO_HORIZONTAL_SCROLL | NO_VERTICAL_SCROLL) {
    
            public int getPreferredHeight() {
                return Display.getHeight() - bmpManager.getPreferredHeight();
            };
    
            public int getPreferredWidth() {
                return Display.getWidth();
            };
        };
    
        /**
         * Creates a new MyScreen object
         */
        public MyScreen() {
            super(USE_ALL_WIDTH | USE_ALL_HEIGHT);
            // Set the displayed title of the screen
            setTitle("Test Animation");
    
            bmpManager.add(rotatedBitmap);
            bmpManager.add(buttonField1);
            bmpManager.add(buttonField2);
    
            manager.add(new SeparatorField());
            manager.add(new SeparatorField());
            manager.add(new LabelField(" label 1 "));
            manager.add(new LabelField(" label 2 "));
            manager.add(new LabelField(" label 3 "));
    
            add(bmpManager);
    
            add(manager);
    
        }
    
        protected boolean touchEvent(TouchEvent message) {
            switch (message.getEvent()) {
            case TouchEvent.CLICK:
                // invokeDialog("-->CLICK");
                return true;
            case TouchEvent.DOWN:
                // invokeDialog("-->DOWN");
                return true;
    
            case TouchEvent.GESTURE:
                TouchGesture gesture = message.getGesture();
                int gestureCode = gesture.getEvent();
    
                if (gesture.getSwipeDirection() == TouchGesture.SWIPE_NORTH) {
                    invokeDialog("swip north : " + gesture.getSwipeAngle() + " , "
                            + gesture.getSwipeMagnitude());
                } else if (gesture.getSwipeDirection() == TouchGesture.SWIPE_SOUTH) {
                    invokeDialog("swip south : " + gesture.getSwipeAngle() + " , "
                            + gesture.getSwipeMagnitude());
                } else if (gesture.getSwipeDirection() == TouchGesture.SWIPE_EAST) {
                    if ((message.getX(1) >= bmpManager.getContentRect().x && message
                            .getX(1) <= bmpManager.getContentRect().width)
                            && (message.getY(1) >= bmpManager.getContentRect().y && message
                                    .getY(1) <= bmpManager.getContentRect().height)) {
    
                        // invokeDialog("swip east : " + gesture.getSwipeAngle()
                        // + " , " + gesture.getSwipeMagnitude());
                        rotate(true);
    
                    }
                } else if (gesture.getSwipeDirection() == TouchGesture.SWIPE_WEST) {
                    if ((message.getX(1) >= bmpManager.getContentRect().x && message
                            .getX(1) <= bmpManager.getContentRect().width)
                            && (message.getY(1) >= bmpManager.getContentRect().y && message
                                    .getY(1) <= bmpManager.getContentRect().height)) {
    
                        // invokeDialog("x = " + bmpManager.getContentRect().x +
                        // " , "
                        // + bmpManager.getContentRect().width + " \ny = "
                        // + bmpManager.getContentRect().y + " , "
                        // + bmpManager.getContentRect().height + "\n mx = "
                        // + message.getX(1) + " , " + message.getY(1));
                        // invokeDialog("swip west : " + gesture.getSwipeAngle()
                        // + " , " + gesture.getSwipeMagnitude());
                        rotate(false);
    
                    }
                }
    
                return true;
    
            case TouchEvent.MOVE:
                // int moveSize = message.getMovePointsSize();
                // int[] x_points;
                // int[] y_points;
                // int[] time_points;
                // int size = message.getMovePointsSize();
                // x_points = new int[size];
                // y_points = new int[size];
                // time_points = new int[size];
                // message.getMovePoints(1, x_points, y_points, time_points);
                //
                // if (x_points.length >= 50) {
                // invokeDialog("-->move : " + size);
                // }else if(x_points.length == 2){
                // invokeDialog("-->move : ssss = " + 2);
                // }
                return true;
            }
            System.out.println("PRINT ME SOMETHING IN ANY CASE");
            return false;
        }
    
        private void rotate(final boolean east) {
    
            synchronized (Application.getEventLock()) {
                UiApplication.getUiApplication().invokeLater(new Runnable() {
    
                    public void run() {
                        // wipe east
                        if (east) {
                            // if (rotatedAngle >= 0) {
                            for (int i = 0; i < 45; i += 1) {
                                try {
                                    rotatedAngle -= i;
                                    rotatedBitmap.setBitmap(ImageManipulator
                                            .rotate(originalBmp, rotatedAngle));
                                    bmpManager.invalidate();
                                    // bmpManager.deleteAll();
                                    // bmpManager.add(new
                                    // BitmapField(rotatedBitmap));
    
                                    // Thread.sleep(100);
                                } catch (Exception e) {
                                }
                            }
                            // }
                        } else {
                            // swipe weast
                            // if (rotatedAngle <= 360) {
                            for (int i = 0; i < 45; i += 1) {
                                try {
                                    rotatedAngle += i;
                                    rotatedBitmap.setBitmap(ImageManipulator
                                            .rotate(originalBmp, rotatedAngle));
                                    bmpManager.invalidate();
                                    // bmpManager.deleteAll();
                                    // bmpManager.add(new
                                    // BitmapField(rotatedBitmap));
    
                                    // Thread.sleep(100);
                                } catch (Exception e) {
                                }
                            }
                            // }
    
                        }
                    }
                });
    
            }
        }
    
        public static void invokeDialog(final String msg) {
            UiApplication.getUiApplication().invokeLater(new Runnable() {
    
                public void run() {
                    Dialog.inform(msg);
                }
            });
        }
    
        public static byte[] resizeImage(Bitmap srcBitmap, int width, int height) {
            // int width = 0;
            // int height = 0;
            // Bitmap srcBitmap = Bitmap.createBitmapFromBytes(image, 0,
            // image.length,
            // 1);
            // if (srcBitmap.getWidth() > srcBitmap.getHeight()) {
            // width = widthT;
            // height = (widthT * srcBitmap.getHeight()) / srcBitmap.getWidth();
            // } else if (srcBitmap.getWidth() < srcBitmap.getHeight()) {
            // height = heightT;
            // width = (height * srcBitmap.getWidth()) / srcBitmap.getHeight();
            // } else {
            // width = widthT;
            // height = heightT;
            // }
            Bitmap destBitmap = new Bitmap(width, height);
            srcBitmap.scaleInto(destBitmap, Bitmap.FILTER_BILINEAR);
            JPEGEncodedImage encoded = JPEGEncodedImage.encode(destBitmap, 100);
            return encoded.getData();
        }
    }
    

    Thank you

    I tried to improve my code and I found the solution

    /**
     * @author : Ahmed Shoeib
     * @description : add BitmapButtonField over BitmapField
     */
    public final class MyScreen extends MainScreen {
    
        Bitmap originalBmp = Bitmap.getBitmapResource("[email protected]");
        BitmapField rotatedBitmap = new BitmapField(originalBmp);
    
        BitmapButtonField buttonField1 = new BitmapButtonField(
                Bitmap.getBitmapResource("images_1.png"));
        BitmapButtonField buttonField2 = new BitmapButtonField(
                Bitmap.getBitmapResource("images_2.png"));
    
        Manager mainManager = new Manager(USE_ALL_WIDTH | NO_HORIZONTAL_SCROLL
                | NO_VERTICAL_SCROLL) {
    
            public int getPreferredHeight() {
                return rotatedBitmap.getHeight();
            };
    
            public int getPreferredWidth() {
                return rotatedBitmap.getWidth();
            };
    
            protected void sublayout(int width, int height) {
    
                setPositionChild(rotatedBitmap, 0, 0);
                layoutChild(rotatedBitmap, rotatedBitmap.getPreferredWidth(),
                        rotatedBitmap.getPreferredHeight());
    
                setPositionChild(buttonField1, getPreferredWidth() / 2, 0);
                layoutChild(buttonField1, buttonField1.getPreferredWidth(),
                        buttonField1.getPreferredHeight());
    
                setPositionChild(buttonField2, getPreferredWidth() / 2,
                        getPreferredHeight() / 2);
                layoutChild(buttonField2, buttonField2.getPreferredWidth(),
                        buttonField2.getPreferredHeight());
    
                setExtent(getPreferredWidth(), getPreferredHeight());
            }
        };
    
        VerticalFieldManager bottomManager = new VerticalFieldManager(USE_ALL_WIDTH
                | NO_HORIZONTAL_SCROLL | NO_VERTICAL_SCROLL) {
    
            public int getPreferredHeight() {
                return Display.getHeight() - mainManager.getPreferredHeight();
            };
    
            public int getPreferredWidth() {
                return Display.getWidth();
            };
        };
    
        /**
         * Creates a new MyScreen object
         */
        public MyScreen() {
            super(USE_ALL_WIDTH | USE_ALL_HEIGHT);
            // Set the displayed title of the screen
            setTitle("Test Animation");
    
            mainManager.add(rotatedBitmap);
            mainManager.add(buttonField1);
            mainManager.add(buttonField2);
    
            bottomManager.add(new LabelField("fffffffffff"));
            bottomManager.add(new LabelField("fffffffffff"));
            bottomManager.add(new LabelField("fffffffffff"));
    
            add(mainManager);
            add(bottomManager);
    
        }
    
    }
    

    Thank you

  • How can I reduce the size of the ButtonField

    Hello

    is it possible to reduce the size of the ButtonField. I want to make the button 50% less of the ButtonField regurla.

    is this possible? If so, how?

    can someone help me please?

    Thank you

    Maury.

    Hi mb1, thank you for your response. It worked for me. And in even, I want the text on the button must also be small. How can I do this? in fact by reducing the button, the button text is displayed as «...» "with 3 points. For example the text of the button 'click here', then after having reduced the size of the buttons, the button text is displayed as «...» ».

    I want the text of the button must be in the very small size.

    How can I achieve this. can you help me please?

    Thank you
    Maury.

  • THIS IS AN EVENT OF A BUTTONFIELD?

    btnCalc private ButtonField = new ButtonField("=")

    {

    public void run () - WARNING: Don't EVER IS USED LOCALLY

    {

    My cod is here!

    }

    };

    The btnCalc is called in the constructor by Add (btnCalc);. But, I Don t know why the vacuum run is not called!... Help please.

    setChangeListener - every field has this method.

  • (BB10) Label multiline

    Hi all!

    I tried to return a label multiline without success.

    There were methods 'multiline' and 'wordwrap' before, but they aren't there now, so I can't force a label field to be multiline.

    When you extend there is a 'isMultiline()' method, but cannot find a way to put it.

    Any idea?

    Use:

    this.label.maxLines = 5; or what ever

  • Align ButtonField Center in HorizontalFieldManger when ObjectChoceField is not selected

    Hello
    I have developed a screen in which there's a topic labelField below that there is an ObjectChoiceField... My position and ObjectChoiceField do not scroll and will remain constant, under the title and ChoiceField object I have some data that must be the subject of a scroll and I could achieve this scrolling thing but my problem is that I place a button below these materials and placed this button in HorizontalFieldManager as follows

    ButtonField back;
    HorizontalFieldManager But_Back = new HorizontalFieldManager (HorizontalFieldManager.FIELD_HCENTER);
    Back = new CustomButtonField ("Back", ButtonField.FIELD_HCENTER);
    Back.setChangeListener (this);
    But_Back.Add (back);

    The first problem: At when only the header of the loading of the page and object coice field and my left side coded hard LabelField will be present and the button below and when I select the value in the ObjectChoiceField then the values corresponding to the labelField letside will be displayed all I can attchieve using the fieldChanged but my button that is currently I am unable to put in the Center... that when the page is loaded without values are present, so the button is to the left side and when I select a value of ObjectChoiceField, then it is aligned to the Center, I want to be at the Center...
    FYI: in the order of scroll implememtn in my Constructori say

    Super (new VerticalFieldManager (), NO_VERTICAL_SCROLL);
    Here I put the code for coice position and object fields in two different HorizontalFieldManager and then announces to the screen
                 
    For the scrolling now, I create a verticalFieldManger like:
    VerticalFieldManager vor = new VerticalFieldManager(VerticalFieldManager.VERTICAL_SCROLL |) VerticalFieldManager.VERTICAL_SCROLLBAR);
    and each variable left and right in addition to HorozontalFieldmanger
    HFM HorizontalFieldManager = new HorizontalFieldManager();
    VFM. Add (HFM);

    and at the end I say
    HorizontalFieldManager But_Back = new HorizontalFieldManager (HorizontalFieldManager.FIELD_HCENTER);
    Back = new CustomButtonField ("Back", ButtonField.FIELD_HCENTER);
    Back.setChangeListener (this);
    But_Back.Add (back);
    VFM. Add (But_Back);
    Add (VFM);

    Add Field.USE_ALL_WIDTH in your VerticalFieldManager and DrawStyle.HCENTER in your ButtonField.

    Something like:

    VerticalFieldManager vfm = new VerticalFieldManager(Field.USE_ALL_WIDTH | VerticalFieldManager.VERTICAL_SCROLL | VerticalFieldManager.VERTICAL_SCROLLBAR);
    ///
    ///
    HorizontalFieldManager But_Back = new HorizontalFieldManager(HorizontalFieldManager.FIELD_HCENTER);
    ButtonField  Back = new ButtonField("Back",DrawStyle.HCENTER);
    Back.setChangeListener(this);
    But_Back.add(Back);
    vfm.add(But_Back);
    add(vfm);
    

    Concerning

    Bika

  • Problem with setBorder in a buttonField custom

    Hello world

    I have a custombuttonfield and I FOCUS put border for NORMAL, ACTIVE, and DISABLED using:

    field.setBorder (ButtonField.VISUAL_STATE_NORMAL, BorderFactory.createBitmapBorder,...);

    The thing is that there is a scenario in which the button will not change until its border of development, he stays with the same active border when it is on focus. If I add just a button on the screen, it works fine, but if I add another component the focus state does not work. Is it something related to the method of paint used in the component that was added previously? The two components (button and customlabelField) are added to the manager (verticalfieldmanager) of the delegate.

    Any help would be appreciated

    Thanks and greetings

    Can you post an example that demonstrates this behavior, here or in The Issue Tracker?

    What model of Smartphone BlackBerry and the BlackBerry terminal software version you test on?  You can find this under Options, all on the BlackBerry Smartphone.

  • How to make Custom Bitmap ButtonField background transparent and not black?

    I have a buttonfield bitmaps customized using a png with transparent rounded corners. It appears as a black rectangle with the image on it. How can I make transparent blackground? I think that my problem lies in this code and I tried to use "alpha" with no results:

    Protected Sub paintBackground (Graphics Graphics) {}

    try {}
    graph.setGlobalAlpha (0);
    graph.setBackgroundColor (Color.BLACK);
    Graph.Clear ();
    }
    Finally {}
    }

    I'm sure it's a simple answer, but thanks anyway for the help!

    So I tried to do the same thing to paint override, and now the buttons are not displayed at all the haha. In any case, another programmer has helped me too and came up with the following code, it works and the problem is resolved. Thanks for your help guys, I'll put 'likes' for you. If anyone needs the code here, this is:

    SerializableAttribute public class BitmapButtonField extends {field}
    _onPicture private bitmap;
    _offPicture private bitmap;
    private int id;

    public BitmapButtonField (Bitmap onImage, Bitmap offImage) {}
    Super(Field.FOCUSABLE |) Field.FIELD_HCENTER);
    _offPicture = offImage;
    _onPicture = onImage;
    }

    {public setButtonImage Sub (onImage, offImage Bitmap Bitmap)
    _offPicture = offImage;
    _onPicture = onImage;
    }

    {} public void setButtonId (int id)
    This.ID = id;
    }

    public int getButtonId() {}
    return this.id;
    }

    public int getPreferredHeight() {}
    Return _onPicture.getHeight ();
    }

    public int getPreferredWidth() {}
    Return _onPicture.getWidth ();
    }

    protected void drawFocus (Graphics g, boolean on) {}
    }

    Protected Sub layout (int width, int height) {}
    setExtent (Math.min (width, getPreferredWidth()),
    Math.min (height, getPreferredHeight()));
    }

    Protected Sub paint (Graphics Graphics) {}
    graph.drawBitmap (0, 0, getWidth(), getHeight(), isFocus()? _onPicture: _offPicture, 0, 0);
    }

    protected boolean navigationClick (int status, int time) {}
    fieldChangeNotify (0);
    Returns true;
    }

    {} public boolean keyChar (key char, int status, int time)
    If (key == Characters.ENTER) {}
    fieldChangeNotify (0);
    Returns true;
    }
    Returns false;
    }
    }

  • FieldChangeListener on a ButtonField displays a prompt with named Application Switch and full Menu options dialog box. instead of the action set.

    Hi I use a ButtonField in my class of the screen and adds a ChangeListener and provided the measures required in

    fieldChanged(Field field, int context)
    

    method. But everytime that I click on a button, a dialog box invites you to two play as Application Switch options and full Menu.


    I think that there is a method that must be overridden to avoid this problem. I get this result when I run my app in the device with OS 5.0, but it works fine on the Simulator (7.0).

    Use ButtonField.CONSUME_CLICK as a style.

    your override of navigationclick should also work, but you would raise the event changed yourself field before return true.

Maybe you are looking for

  • Firefox crashes randomly OSX

    Once in a while my Air suddenly crashes unexpected. It is not related to a specific action that I can take to replicate and test it. But the journal of the accident still seems name of Firefox. This is the last log: https://gist.github.com/dantman/f8

  • I can't share the album on flickr or facebook

    Hello: I have started to use pictures and still trying to find a way to do some very basic housekeeping! First, however, can't you share a photo album. The only option that appears when I chose to share, is iCloud, which I'm not interested in using f

  • 2ND HAND C 5 - CHECKED ACTIVATION LOCK-CAN GET INTERNET BUT NO SIGNAL PHONE-HELP?

    I just bought a second hand 5 c iPhone, the phone captures Vodafone and said this at the top of the screen instead of "no service" but doesn't pick up all the signal bars and so I can not make/receive calls or texts. Internet, wifi and 3 G/4Gall work

  • Plot the graph of origin using Labview

    Hellou, I try to plot the graph of origin using Labview. In Labview I connect and create the new model of origin for instance. Template file (.) OPJ) was created before. End of data in the worksheet then I plot the graph of origin. But I can't use OA

  • Files fragmented in disc of recovery on laptop Pavilion dv6

    Product name: HP Pavilion dv6 Notebook PC Product number: LH601UA #ABA OS: Windows 7 Home Premium 64-bit I recently installed Piriform Defraggler to use as a tool for disk defragmentation. I finished scanning and defragmenting the drive and decided t