invalid field, paint problem

Hello

the following happens on a simulator of the storm and on the real device:

I created a customfield which replaces the paint method. Inside the paint method, I get the display width ("Display.getWidth () ' ') 'RoundRect' for the entire width of the screen to draw.

I also overrided method sublayout, inside I call "invalidate()" to make sure, every change display (portrait to landscape view and vice versa) is noticed.

When debugging, I see that my variable, which is used by the "drawRoundRect" inside my "painting" method has the correct value of 360 (PORTRAIT mode) and 480 (LANDSCAPE view).

But he's not painting in all width, only about 80%, no matter what display I flip.

Only when you turn the device several times, she draws finally all the width once and then when to turn the view once again he painted only about 80% of the width again.

I also tried to call 'invalidateLayout()' inside my overloaded 'sublayout', but that ends only with "IllegalStateException.

I also tried to use "updateLayout()' inside the 'sublayout' method, but it fails with a"provision required during page layout"- Exception. Where should I call 'updateLayout' or "invalidateLayout" instead?

Any idea on how to draw a field to the width of the current view?

Thank you.

More info.

http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800345/...

Tags: BlackBerry Developers

Similar Questions

  • Number of invalid fields in CSV entry on line 1.

    Hello, I'm trying to import a csv file into a table, and I get this error message: number of invalid fields in CSV entry on line 1.
    I tried everything I know and even google for it and cannot find an answer. Any help would be apprciated.

    > Can I create a link the the image folder or put the pictures in the CSV file?

    Put the image names in the CSV file. Create the link in the HTML/server
    scripts, for example,.

    --
    Murray - ICQ 71997575
    Adobe Community Expert
    (If you * MUST * write me, don't don't LAUGH when you do!)
    ==================
    http://www.projectseven.com/go - DW FAQs, tutorials & resources
    http://www.dwfaq.com - DW FAQs, tutorials & resources
    ==================

    "carbiz" wrote in message
    News:gigkb3$MV$1@forums. Macromedia.com...
    > Murray - thank you. I finally understood what was things messing around when I
    > was
    > try to import the CSV file. The Description field was accompanying words
    > " "
    > that has caused the problem. I went through each field and removed the quotes
    > autour
    > every word and now if works very well.
    >
    > My question is: I have added two fields to my CSV file: thumbnail and
    > Image. I have all the images in the Image file under c:wamp\www. How
    > I don't
    > include images in the CSV file? Can I link the image
    > folder
    > or put the pictures in the CSV file?
    >
    > I want to call the thumbnail on my php product registration page and
    > the
    > larger image (Image) on the details page. What is the best way (easy way)
    > without
    > purchase gap or Cartweaver?
    >
    > Thanks for your help...
    >
    > Den
    >

  • Paint problem custom listfield - nullfield

    I created a listfield custom by extending the field manaagers, I use the nullfield for the effect of the update, but it does not work properly. I use two differnet layout for line manager who has no images and the other that contains images. The focus problem occurs only for lines that have pictures. I enclose the code below.

    The images appear correctly once I have the focus and remove on the line.

     //CONSTRUCTOR FOR BITMAPFIELD
        public CustomRow(String _headline, String _metadata, BitmapField bmF)
        {
            bitmapField = new BitmapField();
            bitmapField = bmF;
            _headText = new RichTextField(_headline,RichTextField.NON_FOCUSABLE);
            _metaData = new RichTextField(_metadata,RichTextField.NON_FOCUSABLE);
    
            _headText.setPadding(10, 10, 5, 10);
            _metaData.setPadding(0, 10, 10, 10);
    
            _focus = new NullField(NullField.FOCUSABLE);
            _focus.setFocusListener(this);
    
            bmpRowTextMang = new VerticalFieldManager(){
                public void sublayout(int width, int height)
                {
                    super.sublayout(Width * 3/4, height);
                    setExtent(Width * 3/4, height);
                }
            };
    
            bmpRowBmpMan = new VerticalFieldManager(){
                public void sublayout(int width, int height)
                {
                    super.sublayout(Width/4, height);
                    setExtent(Width/4, height);
                }
            };
    
            bmpRowTextMang.add(_headText);
            bmpRowTextMang.add(_metaData);
            bitmapField.setPadding(10, 10, 0, 5);
            bmpRowBmpMan.add(bitmapField);
            bmpRowMan =  new VerticalFieldManager(){
    
                public void sublayout(int width, int height)
                {
                    setPositionChild(getField(0), 0, 0);
                    layoutChild(getField(0), width, height);
    
                        setPositionChild(getField(1), 0, 0);
                    layoutChild(getField(1), width, height);
    
                    setPositionChild(getField(2),getField(1).getWidth() , 0);
                    layoutChild(getField(2), width, height);
    
                    int height1 = _headText.getHeight() + _metaData.getHeight();
    
                    if(height1<80)
                    {
                        height1 = 80;
                    }
                    setExtent(width, height1);
                }
    
                protected void paint(Graphics graphics)
                {
                    setHeightRow = this.getHeight();
                    graphics.drawLine(10, setHeightRow-1, Display.getWidth()-10, setHeightRow-1);
                    super.paint(graphics);
                }
    
                public int getPreferredHeight()
                {
                    return this.getHeight();
                }
            };
    
            bmpRowMan.add(_focus);
            bmpRowMan.add(bmpRowTextMang);
            bmpRowMan.add(bmpRowBmpMan);
            this.add(bmpRowMan);
        }
        public void focusChanged(Field field, int eventType) {
            // TODO Auto-generated method stub
            this.getManager().invalidate();
        }
        protected void paintBackground(Graphics g) {
              int prevBg = g.getBackgroundColor();
              if (_focus.isFocus()) {
                g.setBackgroundColor(Color.LIGHTBLUE);
              } else {
                g.setBackgroundColor(Color.WHITE);
              }
              g.clear();
              g.setBackgroundColor(prevBg);
            }
    
    }
    

    DEVICE BLACKBERRY BOLD 9780

    One thing to try is to substitute drawFocus do nothing:

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

    But the main problem must be somewhere in your sublayout substitutions. First of all, I am always wary with the help of a manager not abstract, never by calling its sublayout (such as super.sublayout). If you want to do this, substitute rather Manager. If your

    bmpRowMan =  new VerticalFieldManager(){
    

    should become

    bmpRowMan =  new Manager(){
    

    Another problem (this is not obvious and is repeated a lot of different people here) is using setExtent after the super.sublayout of a built-in Manager. Simply put - don't! If you change the width and height parameters before you go super.sublayout and want the Manager to have these exact width and height, set it with USE_ALL_WIDTH and USE_ALL_HEIGHT and filing the setExtent altogether! You pouvez use setExtent after super.sublayout, but you really need to know why you do this. An example is the code for this article in the knowledge base, but it feels more like a hack, you don't need:

    Implementation of a standard style scroll bar

    Good luck!

  • Custom button on a touch paint problem

    I have a custom button that I use to the pop-up window of a PopupScreen. The custom button has his own painting methods (he also replaces the applyTheme() method), and for the most part, everything works as expected.

    The only problem I have is when the button is pressed. If I press and hold the button, the button is redrawn with what seems to be the default paint scheme (it seems that it is painted without label as well). As soon as I release the button and the context menu is displayed, the button is redrawn with my custom methods and look as I hope.

    Suggestions appreciated, thanks!

    If navigationClick is treated by default? This is the root of the problem: I think that integrated ButtonField.navigationClick defines the Visual status of the "active" field Replace to do what you want it to do and do not call super.navigationClick (well, call of may when the status parameter is not 0 - in the case of Alt-click and make shift-click - and you don't want to deal with yourself).

  • Microsoft Paint problem with preview and images printed in being extended

    I used Microsoft paint for years and all of a sudden, I'm having a problem where when I previews the image in paint is be lying and it is also elongated impression. However, the image in the window of the paint itself is fine, and if I open the image in another application IE. Photoshop - image presents a preview and prints correctly. What has changed and how I can fix?

    As I said previously... I guess just but you mentioned that the distortion
    was not only visible when in preview but also appeared on the print
    document. If it occurred during the display, I suspect the video driver.

    If the printer has not been updated for many years... of the manufacturer
    support site might have an updated driver, you could try. And it is certainly
    possible that the printer has nothing to do with this issue...

    If everything worked perfectly until recently... it may be worth trying
    do a system restore in Mode without failure for some time before painting began to have
    problems.

    If you receive auto-mises to update WIndows Update... it is possible that a
    a driver updated of some type has been installed that you aren't aware of.

    Given that the painting seems to be the only application affected...uninstalling/reinstalling
    may be worth a try... but you would need a Win XP install disk.

  • Invalid field of SEC (seconds) on the DHCP requests sent by 9 X 2

    Hi all

    When I plug the phone to the switch (CISCO SGE2010P poe) the phone starts up, but when sends the FIRST dhcp request, it has a value of 29 seconds, so switch relay makes the backup DHCP server and get all the backup information when main is living.

    As can be read on the manual switch:

    "DHCP requests are relayed only if their DRY field is greater than or equal to the threshold value". SPA962 with SPA942, it is always true. The initial time (used to subtract) should be network time and no start.

    Thank you

    I solved this problem:

    The phone was right, the problem is to have activated Spannin tree on the switch, because it will not be before up to 30 seconds broadcast packets to get the link.

    Thank you

  • Paint problem ListField

    Hi all

    I am facing a problem of painting list, I now architecture - when I press on any screen I pop the currentScreen & then push the screen.

    Problem - (OS - 4.6, device - BOLD) area

    a screen with a list of thousand items & when I select an element of the next as a result of this list screen is pushed (first screen jerking) with valid data.

    When I click the back button, I'm popping second & pushing first. But in this case my list is not painted, only when I scroll it gets painted.

    No idea why its not working...? Same object screen's push in the battery (which jumped) still the issue of paint...

    This strategy is paying off for other screens.

    Thanks & best regards,

    Abhay

    Expert thanks for your help.

    The problem was with the way I was adding list ot the optimization of resources.

    The correct order has solved my problem.

    Thank you again...

    Kind regards

    Abhay

  • Extended method of field paint will not called

    I would go to a field and would like to paint something there.

    By extending the field I must apply setLayout (int x, int y) wcich get is called successfully.

    Thing strange number one: x is 360 (that's fine because I have it returned by getPreferredWitdh), there is

    1073741803 which is more hell? In getPreferredHeight I returned 480...

    Second, my method of painting is not called at all! See code below.

    You forgot to call your layout() setExtent() while defining the scope of the field is the main object of the layout () - to tell the parent Manager how much space you wish to occupy. Without putting your width and height are (0, 0), which explains why your parent Manager never calls object of your field.

    The fact that you get almost unlimited height in your layout() is also easy to explain: you probably use screen that has default VERTICAL_SCROLL.  And managers who have VERTICAL_SCROLL allocates Integer.MAX_VALUE > 1 pixel at the start for their children.  Your LabelField consumed 14 of this value (using setExtent (textWidth, 14), of course) and then screen offered the rest of your domain.

    Also note that getPreferredHeight() and getPreferredWidth() are ignored by the vast majority of managers and fields.

  • Invalid field

    Hi all

    I have two areas of labels of the gains of land vefticalfield first manager.when label focus wil change to yellow color of his text. Along with this, I need second label field to change its color... That is to say, when the first label field gets focus, I need 2 color of text field label to modify.  his does not work. I do not get option to invalidate also... Help me.

    Thanks in advance

    Hello

    write custom labelfield. Like this

    customLabelField secondlabel = new customLabelField ("second label");

    class customLabelField extends {LabelField

    Private boolean isfocus = false;

    customLabelField (String text) {}

    Super (Text);

    }

    protected void paint (Graphics graphics)
    {

    graphics.setColor (isfocus? Color.YELLOW: lbl1color);
    Super.Paint (Graphics);
    }

    {} public void setonfocus (boolean value)

    isfocus = value;

    Invalidate();

    }

    }

    WHEN first labelfield had focus {}

    secondlabel.setonfocus (true);

    }

    Thank you & best regards

    pp

  • Field Focusable problem

    Hi all

    In my program, there is 1 HorizontalFieldManager and 2 AbsoluteFieldManager

    Now, I add 2 AFM of HFM and it looks like this

    __ ___ __ ___ __ __

    |    AFB1 |    AFM2 |

    ----------------------------

    the problem is when I add a buttonField, ButtonField.Focusable in AFM2

    When the application is run, the starting point should not be the AFB1 but it's my buttonField

    I think that happens because of the buttonfield Focusable

    If anyone knows how to fix this help please me, all I want is to ensure that the application starting point will be to first vfm.

    Thank you

    on the screen display, the first Focus field gets focus.
    There are no fields in AFB1, how to get the focus?

    You can put a nullfield in this, or any other field focusable.

  • Rich text field, scroll problems

    Hello world

    I currently have a problem with the rich text fields.  I have a selected rich when custom text field (onFocus), it colors the blue text when not selected (onUnfocus), the text is white.

    I have Setup several of my RichTextFields in a VerticalFieldManager so they can be scrolled as a list.

    Now scrolling works on the following simulators:

    Bold 9000 4.6.0.266

    Curve 8520 4.6.1.272

    But no scrolling does work on this Simulator:

    Bold 9700 5.0.442

    What Miss me?  I know the o/s changed, but if it should not be backward compatible?

    I use Blackberry JDE component Package 4.2.1

    Any help would be greatly appreciated.

    I found the problem.  The super I was calling was super (text, Field.FOCUSABLE), this caused the 9700 Simulator not to focus the richtextfields.

    The Builder suitable for call is super (Field.FOCUSABLE), and that fixed the issue.

    Now, I have another problem.  Suddenly, I added a few images, the background (they are all less than 300 KB) tested on simulators of 9000 and 8520, it worked.

    When I test it on the 9700, it says net.rim.device.api.system.Application not found

    Hint anyone?

  • Hidden field inserted problems

    Hi all

    Insert several rows in my database I'm can't insert 2 hidden fields (MATCH_ID and PLAYER_ID) that have been already filled with data from another table.

    I can see that the info in the hidden fields works, but when I submit the form, no data is passed to two columns that have hidden fields, and the database has always 'NULL' in these 2 columns. There is a column to auto-increment with a hidden field that is working properly, but not two columns that have the "pre-populated" data from other tables in.

    No one knows if it will be to see with my insertion code? (example below) I use GetSQLValueStrings for all areas, but think it might be the problem?

    $insertSQL = sprintf ("INSERT INTO 'player stat 0910' ('UNIQUE STATS ID', 'GAME ID', 'ID PLAYER', 'START',"SUBS USED","SUBS NOT USED","DNA","GLS", 'ASST', 'RED', 'YEL', 'MOTHER') VALUES (%d, %d %d %d, %d, %d, %d, %d, %d, %d, %d, %d)" ")

    GetSQLValueString ($_POST ["UNIQUE_STATS_ID$ i"], "int").

    GetSQLValueString ($_POST ["MATCH_ID$ i"], "int").

    GetSQLValueString ($_POST ["PLAYER_ID$ i"], "int").

    GetSQLValueString ($_POST ["STARTING$ i"], "int").

    GetSQLValueString ($_POST ["SUBS_USED$ i"], "int").

    GetSQLValueString ($_POST ["SUBS_NOT_USED$ i"], "int").

    GetSQLValueString ($_POST ["DNA$ i"], "int").

    GetSQLValueString ($_POST ["GLS$ i"], "int").

    GetSQLValueString ($_POST ["ASST$ i"], "int").

    GetSQLValueString ($_POST ["RED$ i"], "int").

    GetSQLValueString ($_POST ["YEL$ i"], "int").

    GetSQLValueString ($_POST ["MOM$ i"], "int")

       );

    Here's a sample for one of the input rows, which includes check boxes and text fields.

    < b >

    < td > < input type = "hidden" name = "UNIQUESTATSID2" id = "UNIQUESTATSID2" / > < table >

    < td > < table >

    < td > < input name = "PLAYERID2" type = "hidden" id = "PLAYERID2" value = "102" / > < table >

    < class td = "playernametext" > John Doe < table >

    < td > < input type = "checkbox" name = "STARTING2" id = "STARTING2" value = "1" / > < table >

    < td > < input type = "checkbox" name = "SUBSUSED2" id = "SUBSUSED2" value = "1" / > < table >

    < td > < input type = "checkbox" name = "SUBSNOTUSED2" id = "SUBSNOTUSED2" value = "1" / > < table >

    < td > < input type = "checkbox" name = "DNA2" id = "DNA2" value = "1" / > < table >

    < td > < input name = "MCG2" type = "text" id = "MCG2" size = "3" / > < table >

    < td > < input name = "ASST2" type = "text" id = "ASST2" size = "3" / > < table >

    < td > < input type = "checkbox" name = 'RED2' id = 'RED2' value = "1" / > < table >

    < td > < input type = "checkbox" name = "YEL2" id = "YEL2" value = "1" / > < table >

    < td > < input type = "checkbox" name = "MOM2" id = "MOM2" value = "1" / > < table >

    < /tr >

    < b >

    All the General ideas would be much appreciated if possible, let me know if you need more than any code or a link to the page/site

    See you soon

    Andy

    > There is only one form that surrounds the

    > the entire table, all other fields are entered

    > fine and they don't have a single shape

    > field around each text, checkbox etc.

    Look again. Everything else IS in a form field. You need a form around the MatchID field. And that ID of player is not insert it is because you are using the correct name. On the form, it's PLAYERID, but the script is looking for PLAYER_ID.

  • Display 'ERROR' in calculated field so dependent on the invalid fields

    With the help of oracle forms 10 g 2.

    I have a field on a form that calculates its values from the other 3 fields/values provided to it. Is currently is a numeric field. The form acts as a case of mistaken for why a presentation could not operate, and so the fields could have given "bad" in them. If one of the three fields that are used for the calculated field is invalid, is there a way to display 'ERROR' in the calculated field or should I simply display an error message instead?

    IE:
    If a is 1, b 2 and c 3 calculated field would display "6".
    If a is 1, b 2 and c f the calculated field would display "ERROR".

    If you make a char data type, the calculated field, you can put whatever you want in it, numbers or the Word error.

    You can even create a calculation function that returns the text - either digital or alpha.

  • YouTube-nocookie field has problems in Firefox, but not in Google Chrome

    This problem just started a few days ago. This problem appears in embedded videos who have worked for months, at least.

    I use the YouTube of incorporation iframe method. When I use youtube-nocookie area, which is an option that YouTube itself offer to me, when I try to play the embedded video I get the message ' year error occurred, please try again later. " "< a target ="_blank"href ="https://support.google.com/youtube/answer/3037019?p=player_error1 & rd = 1"> learn more < /a >."

    More information is a link to https://support.google.com/youtube/answer/3037019?p=player_error1 & rd = 1 that this link is no help.

    I'm using Firefox 36.0.1. There is no problem with the same video built into Google Chrome. My research Google about this problem never took me to an item on the support page of Mozilla, but I think I'll watch it then.

    Here is a link to a post where I see the problem.

    http://ssgreenberg.name/PoliticsBlog/2015/03/04/Sen-Warren-to-GOP-stop-ambushing-workers-rights/

    Even when I use the link with youtube-nocookie directly in the toolbar URL in Firefox, I get a blank page. If I take the nocookie - of the domain in the address bar, the video plays.

    The problem with YouTube is that the http://www.youtube.com/watch?v=TLT2nV3sWtw file exists, and you will get the correct video.

    Make a right click on the drive in window displays the URL of the video.
    https://www.YouTube-Nocookie.com/watch?feature=player_embedded & v = TLT2nV3sWtw

    In the iframe, I had https://www.youtube-nocookie.com/embed/TLT2nV3sWtw. This file exists on www.youtube-nocookie. For Firefox, YouTube changes the request to https://www.youtube-nocookie.com/watch. Notice the word to embed watch. This file exists on youtube.com, but not on youtune - nocookie.com. This is in contrast to the other file that exists in the two areas.

    On Google Chrome, on the same iframe, when I right click on the video player to copy the URL, I get https://www.youtube.com/watch?v=TLT2nV3sWtw. So the nocookie - has been deleted for Google Chrome, but not Firefox. It is a 'mistake' of obviouslty YouTube.

  • Cursor to the field browser problem

    Hi friends,

    I use the browserfield in my application.

    I use non touch BlackBerry device for testing.

    When display focus on browser developed and produced at the cursor doesn't move so is not not on other fields such as the button.

    so, how can I do to put emphasis on the other domain?

    Hi, I tried this,

    his work for non touchscreen devices.

    Simply create instant browserfield after setting the browserfieldconfig property.

    THIS LINE has BEEN HERE: / / mybrowerField = new BrowserField (browserFieldConfig);

    browserFieldConfig.setProperty (BrowserFieldConfig.NAVIGATION_MODE, BrowserFieldConfig.NAVIGATION_MODE_CARET); browserFieldConfig.setProperty (BrowserFieldConfig.JAVASCRIPT_ENABLED, Boolean.TRUE);

    mybrowerField = new BrowserField (browserFieldConfig);

    Thanks for the support.

Maybe you are looking for

  • My master password suddenly no longer works, can not access e-mail

    I tried to reset my password, as described in the help section. He said the password was reset... but what? He never asks me what I want to reset the password! So I try to log in again, and the same thing happens, suddenly is a password that works we

  • Wireless at sign on

    Everytime I turn on my laptop it never connects to the wireless network immediately. Invariably, I have to restart the system so that there is a link. Help please

  • The paper is picked up too soon and the top of the page is still too high

    The paper is picked up too soon and the top of the page is still too high I have an HP Officejet 6500 A Plus I had a paper jam I took out the paper As I pulled the paper, now the print jobs are too high on the paper.  It seems that one of the gear sl

  • Crash of synchronization to blackBerry Smartphones

    During the synchronization of my office for the BB, it hangs at step "calendar of transformation." Here are the details of the accident: problem event name: APPCRASH application name: DesktopMgr.exe fault Module name: StackHash_d711 fault Moudle Vers

  • Adobe hosting

    Hola hemos estado intentando contract los planes Adobe para poder trabajar con adobe muse, estamos having problemas del tipo that hosting no tenemos pago fr. options euros