Question view screen with custom fields

I've developed a class that extends the scope and Implements DrawStyle. The field contains a bitmap with text drawn on the left of the it... nothing too complicated. I made focasable, has erased layout and drawFocus, painting, etc., but I'm having a Visual anomaly.

On my screen (no title), I added a LabelField (non-active), and then a BitmapField (non-Focus), followed by a number of my custom fields. When the first screen, everything looks great. My first custom control has focus and is drawn as such.

The problem occurs when I scroll through the custom control 3rd to 4th (causing the screen scroll), the 2nd custom control appears twice, the 3rd is missing and the 4th has the focus. There are also some white background that starts to show through (my controls are all black and is so the bottom of the screen and other controls).

Of course, I'm having some trouble of painting, but it is certainly related to scrolling.

What methods should be overritten in a custom control to ensure the scrolling will work properly?

Which must be defined in the screen?

1. prepare your screen unscrollable as:

Super (NO_VERTICAL_SCROLL);

2 use a VerticalFieldManager to add all of your components.

Make sure verticalManager Scrollable and set its size and background color.

Something like:

        mainManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR)
        {
            //setting background color
            protected void paintBackground(Graphics graphics)
            {
                graphics.setBackgroundColor(0x00000000);
                graphics.clear();
                super.paint(graphics);
            }
            //setting its height and width
            protected void sublayout( int maxWidth, int maxHeight )
            {
                int width = Display.getWidth();
                int height = Display.getHeight();
                super.sublayout( width, height);
                setExtent( width, height);
            }
        };

3. now add this to your screen.

Now your screen does not scroll and you will not get the white background at the end.

Let me know if you have any questions.

Concerning

Bika

Tags: BlackBerry Developers

Similar Questions

  • How to fill the screen with custom display fields

    I need to instantiate a class of custom field and add it to a number fixed times who knows @ length of the screen.

    I created a table to create objects of a custom field, and then I add elements to the screen one by one.

    I use this code where the entries knows @ runtime.

    There is error but the fields are not added to the screen and the screen and the screen is blank.

    CustomField item[]=new CustomField[entries];
    int entries;
    for(int i=0;i			 

    Some stupid problem just to retrieve the integer. Now, copy the following code works correctly.

  • Need help with Custom Field Layout - getting wirer height value

    In the BB Simulator, I get a strange value placed in in my field layout() method custom. The width is 320, which is correct, but the height is 1073741823 and it takes 240 or less. In this test, my custom field is the only field in the Manager, so I expect to 240.

    I tried two different simulators - BB curve and the 8800. I use JDE 4.5.0 in Eclipse 3.4.1. This is the code for my method of layout:

    Protected Sub layout (int width, int height) {}
    s long = getStyle().
    If ((s & USE_ALL_WIDTH)! = USE_ALL_WIDTH) {}
    width = Math.min (width, getPreferredWidth());
    }
    If ((s & USE_ALL_HEIGHT)! = USE_ALL_HEIGHT) {}
    height = Math.min (height, getPreferredHeight());
    }
    setExtent (width, height);
    model.setExtent (width, height);
    Model.Scroll (0, 0);
    }

    I expect the value of the screen height, or less, if the domain is configured correctly.

    I'm upgrading my custom field in a VerticalField Manager with the following attributes:

    Super (VerticalFieldManager.USE_ALL_WIDTH
    | VerticalFieldManager.USE_ALL_HEIGHT
    | VerticalFieldManager.FIELD_HCENTER | VerticalFieldManager.FIELD_VCENTER);

    Is this a bug in the Simulator, or I understand the API correctly? Is there a way to 'reset' the Simulator - I tried to get out of Eclipse and restart Windows, but I always get the same value.

    Thank you!

    Mark

    A VerticalFieldManager comes, I think, with default VERTICAL_SCROLL.  If you do not want to scroll through this particular Manager, add VerticalFieldManager.NO_VERTICAL_SCROLL to your forests of style and it will be laid out with only the height and the actual width.

    Also, since you setExtent() by yourself, USE_ALL_HEIGHT and USE_ALL_WIDTH are redundant, I think.

    Hope that helps,

    Arkady.

  • Create a virtual report machine include: Pool of resources with custom fields

    Hello

    I would like to create a VM report that includes the name of the virtual host computer and Discription, as well as the virtual machine Resource Pool belongs too.

    I would also report to query for custom fields, provide the names, values, and to give it in a format that works with export-csv.

    I have a start on the script and it included as an attachment.

    How should I go about adding custom fieldsvalues?

    How can I add the name of the Resource Pool of the report?

    Thank you in advanced for your help.

    Tim

    The problem with the CustomFields, is that I don't know how they are defined on a guest.

    It's a problem when you want to make an Export-Csv thereafter. The cmdlet can handle variable-length items in the table very well.

    That's why I put 1 CustomField in 1 rank.

    $report = @()
    Get-ResourcePool | %{
         $rpName = $_.Name
         $_ | Get-VM | %{
              $vmName = $_.Name
              $_.CustomFields | %{
                   $report += New-Object PSObject -Property @{
                        ResPool = $rpName
                        VM = $vmName
                        CustomName = $_.Key
                        CustomValue = $_.Value
                   }
              }
         }
    }
    $report | Export-Csv "C:\report.csv" -NoTypeInformation -UseCulture
    

    BTW, the Export-Csv cmdlet is a standard cmdlet. Has nothing to do with Dmitri.

    Note that the script in this format requires PowerShell v2 RTM

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • long web form with custom fields

    I'm having a problem with a long web form in British Colombia.

    The HTML for the fields is in the right order, but when the outputs data e-mail Notification of workflow, some fields are out of use. One of my fields has the answer to one of the other fields.

    Is there more info on how the CAT_Custom_360831 are born somewhere?

    I put a fresh webform on a page of the administration area of web form and then re - assign these on my html form match?  CAT_Custom_360831

    I need to hire an expert form.

    Thank you.

    Hi meltoncreative,

    The order of the fields in the page and in the admin cannot influence the order in the workflow notifications. It's just not possible at this stage to specify the order of the fields in the workflow emails.

    See you soon,.

    -mario

  • Question regarding setExtent and getPreferredWidth for the custom field

    I am trying to understand the difference between getPreferredWidth and setExtent, which relate to the width of a custom field.

    I create a field that may be greater than the width of the screen. The field is made up of cells (for example columns and lines or cells, such as a table). The cells contain text, shapes, lines, color, etc. When I display the field I only paint the visible columns on the screen and allow the user to use the trackball to accomplish the columns out of the screen.

    At present, getPreferredWidth returns the total width of the field without all the empty columns, is longer than the width of the screen. I use the same value in setExtent for width. GetPreferredWidth must return the size of the field that is painted on the screen - the total width less the width of the columns out of the screen? I have the same question about setExtent - width either in total, longer than the screen width or the width of the part of the field that is painted on the screen?

    If I use the width of what is painted on the screen or the other of these methods, then the width changes when the user scrolls through the field. As the user scrolls, I calculate the number of columns will agree to a width of the screen and paint these columns. Is it a problem to have the PreferredWidth and the setExtent change width? I read that setExtent is called only when the Manager sets this field, so that the changes will not be recognized.

    It seems to work in two ways in a few simple tests, but I was just curious as the value of width that is right.

    Thank you!

    Mark

    When a field has changed in a way that requires the update of the screen (for example, after scrolling offset changes), simply call invalidate() from this area. That will eventually lead to paint (Graphics) for the field. At this point, you return the update field. (If only part of a field - as a single cell - needs to be updated, there invalidate() versions that accept arguments where, for efficiency, you can limit the update for just this part.)

    If I understand your needs, you can achieve the effect desired in the paint method. You can use the current dimensions of the field, the cutting of the graphics area, and your internal roll compensates to decide what to paint and what to delete. Let your custom field leave white space where you decide of doesn't make is not part of a cell. There is no need to change the scope of the field.

    If you go about it by changing the dimensions of the field, and then you ask the system to play much more work he has to do. If the custom field is the only field on the screen, it won't make much difference in the behavior (although there may be performance). With more than one field, it can be weird effects. For example, suppose that your custom field is one of several fields in a HorizontalFieldManager and you change the field width. When the HorizontalFieldManager recalculates its own layout, it will change the horizontal position of the fields to the right. The effect on the user, I think, would be really confusing: as the custom field parade, parties to the right of the screen could bounce left and right as the changed width field. I can't imagine that's what you want.

    Here's another way to think about this: absent some bit of style, your custom field would prefer be exactly wide and high enough to show all without scrolling. So the width and height would be based on adding the appropriate cell widths and heights, regardless of what actually is on the display. (It's also a long time that you do not have something fanciful.) If the optimum height is a function of the width available - as with sheathed on the line of text - you would implement this logic in the layout method. You then have no use for autonomous preferred width and height).

  • WebApp Custom Fields with liquid

    With the liquid rendering engine tags in webapps have changed.

    For example, in the layout of the list I could view the name of the Web application element by using the following tag: {tag_name_nolink. with liquid I use:{{name}}

    But for custom fields webapp, what is the equivalent liquid?

    Example:

    I have a tag called "reserved". I can output the use of tag: {tag_Reserved by}. With the liquid how would display the same tag?

    Am I missing something?

    Lynda

    Words Mario to see what is available, not only on the web apps but to access a custom field because it has a name that can be spaces etc you do as follow:

    {{it. ["My custom field"]}} is how you get a custom fields data.

  • iMac G3 tray charger stuck on the gray screen with question mark flashing folder

    I recently bought an iMac G3 (charger tray, 333 MHz, M4984) and when I try to boot from an OS installation disc 10.3, there will remain only blocked on the gray screen with folder flashing with the question mark. Not only it does not maintain the keys C or Option, but it will not start up any combination of keys, such as resetting the PRAM or the NVRAM. It just starts and stays on the screen with the flashing folder does nothing. It CAN read the keyboard, because I can turn on the computer with the keyboard, it just won't start to the top of any disk or any combination of keys. Any ideas on what could be the problem? I just replaced the hard drive, but it was the same before I replaced the hard drive as well. In addition, the iMac had apparently OS 8.6 installed on it when it came, and I think I need to move to OS 9 and do a firmware update before you install OS X (correct me if I'm wrong), but I can not do because the iMac does start not in general of any combination of keys. Thanks in advance, any help is appreciated.

    I recently bought an iMac G3 (charger tray, 333 MHz, M4984) and when I try to boot from an OS installation disc 10.3, there will remain only blocked on the gray screen with folder flashing with the question mark.

    Valid operation system not found.

    Not only it primer not leave now pressed the C or

    Place the cd in the drive.  power off.  Hold c power key on & while in the startup is underway.

    Keys options,

    key option is not supported on tray loading imac g3 333

    In addition, the iMac had apparently OS 8.6 installed on it when it came, and I think I need to move to OS 9 and do a firmware update before you install OS X (correct me if I'm wrong), but I can not do because the iMac does start not in general of any combination of keys. Thanks in advance, any help is appreciated.

    It took charger slot, but I think that optional for the bin.  I think that you can upgrade the firmware with 8.6 for trays.

    You may need to reset the PRAM and NVRAM and Mac's Open Firmware. Stop the Mac, then it turns on and before the screen lights up, quickly down the command, Option, P, and R keys, until the Mac rang twice more after the power to chime.

    Then, before that lights up the screen, hold down the command-Option-O-F until the Open Firmware appears. Then enter these lines, and then press return after each of them:

    Reset-nvram

    Configure default

    Reset-all

    "The reset-all command should restart your Mac. If so, you have successfully reset the Open Firmware settings. »

    http://support.Apple.com/kb/TS1812?viewlocale=en_US

    In the case of the...

    Try taking the battery for 10 minutes.  Put back in the battery.  Fingers crossed. Turn the machine back on.

    How do I eject the cd from the internal drive:

    eject the cd

    List of devices:

    devalias

    List of variables:

    printenv

  • Workin in Live View mode when I press the zoom button to focus, I get a white screen with an x 5 or a wr 10 x

    Working in Live View when I press the zoom button to focus, I get a white screen with an x 5 or x 10 written.  I do not get the image of zoom.  He just started this today and I used it for years.  Any help?  Thank you.  OH, I have a 450 d (rebel xsi)

    Thank you very much

  • 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...

  • HI, I'm wanting the form tool allows you to create multiple copies of documents with customized in each information fields. From excel data. Is this possible?  Thank you, Charlotte

    Hello

    I am keen on the form tool allows you to create multiple copies of documents with customized in each information fields. From excel data. Is this possible?

    Thank you

    Charlotte

    This is called a fusion and mailing. There is a possibility of Embedment in some versions of Excel (via the Acrobat PDFMaker plugin), or it can be done using a script.

  • Hi, after that I tried to load either a new or existing project into Adobe first Elements 9 I just get a grey white screen with any of the timeline, boxes etc. on the view. It happened suddenly, one day OK then not! At the top of the screen, I get normal

    Hi, after that I tried to load either a new or existing project into Adobe first Elements 9 I just get a grey white screen with any of the timeline, boxes etc. on the view. It happened suddenly, one day OK then not! At the top of the screen, I get the normal icon of pre, File, Edit, Clip, etc..

    I intend to have bought the first 13 items, it would be better if I bought a new program instead of downloading an upgrade, just in case the upgrade does not correctly load because of the error with my current program?

    If I have the deleted first Elements 9 on my PC would I lose all my existing videos that have been produced using Prime Elements 9 or would they be registered so that they can still be worked in first 13 items?

    First elements 13 works with Windows 7?

    Thank you

    Terry

    First 13 elements absolutely works with Windows 7!

    In fact, I highly recommend you download the free trial version and give it a test run.

    In the meantime, go to Windows Update and make sure you have all the updates of Windows, including those who do not automatically install it. Then go to the website of ATI / nVidia and ensure that you have the latest driver for your graphics card and go to Apple.com and ensure you have the latest version of Quicktime, by the requirements of the program.

  • Right service DPS with 'Custom tabbed view' Application?

    Hi all

    It will be possible to use the new law with an application service 'custom tabbed view"generated with the DPS Configurator (the one using the label of filter of the publications to create categories)

    Thank you very much

    Yes, you can use the service of law with the custom tabbed view. Let me know if you have any problems.

  • Read custom with vMA fields

    Hello together,

    I'm looking for information for playback of an attribute with a perl program field.

    To read a field annotation from a virtual machine.

    Can someone help me with an example script?

    Thank you

    Timm

    Take a look at these two scripts as references, such as annotations, and custom fields are two different things.

    http://communities.VMware.com/docs/doc-10779

    http://communities.VMware.com/docs/doc-10220

  • ComboBox with customized view plugin

    Hello

    I used the plugin "Combobox with Custom Display".

    I have similar question

    When I entered the text in the textbox and scroll down using the keyboard button. The party highlight cannot scrolling with scroll.

    The demo link for above question

    http://Apex.Oracle.com/pls/Apex/f?p=35538:4

    kindly help me.

    Thank you

    Shiv says:
    Hello

    I used the plugin "Combobox with Custom Display".

    I have similar question

    When I entered the text in the textbox and scroll down using the keyboard button. The party highlight cannot scrolling with scroll.

    The demo link for above question

    http://Apex.Oracle.com/pls/Apex/f?p=35538:4

    kindly help me.

    Thank you

    Its a bug in the code of the plugin and not related to the APEX.

    I will study the issue and fix my code to resolve this problem, please bookmark this page http://www.apex-plugin.com/oracle-apex-plugins/item-plugin/combobox-with-custom-display_212.html and search for updates.

    Thank you
    Vikram

Maybe you are looking for

  • How cooking up Bookmaks

    There are many files in my 'Favorites', with a lot of web addresses.How can I save this as a return to the top?

  • P200-178 will not recognise printer network

    Any help is appreciated with this. We bought an Equium P200-178 to replace an older laptop, but we also currently have a desktop computer. These two share, via a reuter, an Epson Stylus DX6000 printer without no problem running. Two laptops to our gr

  • Can not pass by the spot metering on my 60 d

    Not didn't have problems with my 60 d 1.5 year, until last week when all of a sudden I couldn't move on my spotmeter. The back screen says it's on the spot metering, but the counters of the camera in evaluation mode. I tried to remove and reinsert th

  • Smartphones blackBerry 9900 data Plan does not work!

    Hi, new here, great site! I'm from Canada, with Koodo and bought a unlocked 9900 opportunity, my neighbor via a Classifieds site, and as much as I know it was his business phone.I wiped it it clean and improved the operating system to 7.01 I noticed

  • How to install the 16-bit game in Windows 7 Home Premium 64-bit

    I wanted to install my game of childhood as VirtuaFighter 2, Virtua Cop 2, Daytona USA Deluxe.All in a single disc named Sega CD 3 But it can only support with 16-bit windows version.my version windows is now home premium 64-bit.I tried the windows v