more UI questions. Custom LabelField and ListField text positioning

Hello

I have two questions.

1. I implement a LabelField, and I want to be the width of the screen and the text to be in the middle of its width. I am implemented with these bits of style: DrawStyle.HCENTER | DrawStyle.VCENTER | Field.FOCUSABLE | Field.FIELD_HCENTER. Then I overload layout() with this:

public void layout(int width, int height) {
                super.layout(width, height);
                setExtent(Display.getWidth(), this.getPreferredHeight());
            }

The result is that the width of the field extends across the width of the screen, but the text is left-aligned. What I am doing wrong?

2. I've implemented a ListField personalized with a custom drawListRow(). For some reason, the color of the text in the highlighted line remains black. I don't know what I did wrong. I was expecting that there the default highlight a behavior, which is thoroughly blue, white text.

Thank you

        public int moveFocus(int amount, int status, int time) {
            _listField.invalidate(getSelectedIndex());
            return super.moveFocus(amount,status,time);
        }

        //Invoked when this field receives the focus.
        public void onFocus(int direction) {
            super.onFocus(direction);
        }

        //Invoked when a field loses the focus.
        public void onUnfocus() {
            super.onUnfocus();
            _listField.invalidate(getSelectedIndex());
        }

In my ListFields sexy do Paint (usually different color according to the status background), I use a substituted ListField that invalidates whenever he thinks he needs to, the idea being that it forces the line to be redrawn.

I'm not confident in them, but they do not seem to work.  It's code that I created when I started it first, I didn't need to change so I don't have, but I'd be very confident that it is not optimal.

OK, so you know this code comes with no warranty.

I have replaced three routines as follows:

Tags: BlackBerry Developers

Similar Questions

  • Custom Custom Format AND Date text field label

    I have created a form where I wanted each form field to have a label so that the user knows what to connect, BUT when I arrived at this day it became clear that I can only do one or the other, enter a name or select a date format, because they are both under the same category selection and you can choose only one. I found a previous discussion and was able to use the following code to label all the text fields and he also mentioned that an additional coding would be required to customize the date:

    Custom format for text field script

    If (! event.value) {}

    Event.Value = "enter meeting requested Date."

    Event.Target.Display = display.noPrint;

    } else {}

    Event.Target.Display = display.visible;

    }

    Now my problem is that in order to label the tabled text, I had to do a custom format, so I am unable to choose a custom date format. Instead of getting the error message when the format is wrong there at - it a way to make sure that no mater what type of date is connected, it is automatically reformatted to (mmmm dd, yyyy)?

    I don't know am new to the form of coding features and indeed if there is another way to lock it I would appreciate the help.

    Yes, it is possible... Basically you would use something like this as the custom for the field validation script:

    Event.RC = true;

    If {(event.value)

    var d = util.scand ("mm/dd/yyyy", event.value);

    If (d == null) {}

    App.Alert ("Invalid value.");

    Event.RC = false;

    } else {}

    Event.Value = util.printd ("mmmm dd, yyyy", d);

    Event.Target.Display = display.visible;

    }

    } else {}

    Event.Value = "enter meeting requested Date."

    Event.Target.Display = display.noPrint;

    }

    I have not tested, but I think he should do the trick.

  • Question of ratio and CS3 text

    I don't get this thing of ratio.  I'm editing a project on the big screen.  All my possessions are 720 x 480 under video information in the project window, yet they all fit in the widescreen format in the output to chronology.  I get that it is 720 x 480 4 x 3.

    So I opened the text window to insert text, and I see that the window is in the format 4 x 3 and I don't know how to expand it so that I can move text anywhere on the timeline widescreen.

    My main question is to know how get the window text to be big screen but if anyone can make an explanation to this thing whole ratio I would appreciate it too.


    Thank you

    Craig

    There are two 'proportions." The first is the Aspect Ratio of the image size. It is 720 x 480, you see. Then there's the IRON (Pixel Aspect Ratio), which mentions John T... In SD, there are two Commons BY, which determine how images are made using non-square pixels. Basically, they are 0.9 and 1.2 (CS4 and CS5 have corrected the rounding of the these BY just a little bit), which means that for Standard (4:3), we have rectangular pixels that are larger, they are wide, where the BY 0.9 and for widescreen (16:9), they are wider, they are great, where the BY 1.2. This is the same pixel x number of pixels, but these pixels are different sizes of rectangles.

    Good luck and we hope this helps,

    Hunt

    PS - 4:3 titles, you can use the fixed effects > Motion > scale (unchecking proportional), but beware of the "stretched" text, as it might be easier to do it again, to change these visual attributes.

  • Big client - vCenter 5.5 response time of the customer Web U1c / questions of Performance and Navigation

    So we're all aware of the issues with vCenter 5.5U1 WebClient and how we are forced to use it to make use of all the features of the v10, vDS 5.5 vHardware (config switch changes the synchronization problems if an emergency change is done on c# client vDS) VSAN only available via the web client, flash, sluggish to questions do not respond the questions and the list goes with the presentation of the menus and hard to navigate, issues SSO (always after 5.5 upgrades)

    So @ VMware vCenter Architecture Team is going to make an effort to hear and give due to the much needed performance improvements and improvements to the user interface before adding more features and SSO type services which majority of clients don't use not and not force it's customers continue to loose faith its vCenter product?

    Looking for answers with options to remove vCenter 5.5 U1c installation as well as a promise to answer to these in vCenter 6.0 version!

    Here is your answer. First of all, to use Chrome as your browser, then you need to go with at least 4vCPU * 32 GB of RAM & adjust the segment size of java for SSO, Tomcat, (TC) Management Server, inventory server and profile based storage to "refine" vCenter device with DB Oracle embedded or external memory. I did, and performance gains went 10 X. This includes the vSAN enabled running clusters. My recommendation that works very well based on design documents:

    vCenter Server inventory

    VMware VirtualCenter Management Webservices (tc Server)

    The inventory service

    (Sps) profile-based storage service

    Large (more than 400 guests or 4000 VMS) stock

    4 GB

    12 GB

    4 GB

    Setting on the vCenter server 5.5 of the memory unit

    • Connect the unit to vCenter server using SSH
    • VI /usr/lib/vmware-vsphere-client/server/wrapper/conf/wrapper.conf configuration file, locate the JVM memory section and change maxmemory to 4096
    Line 66 # Memory #wrapper.java.initmemory = 512wrapper.java.maxmemory = 4096 JVM
    • /usr/lib/vmware-vpx/inventoryservice/wrapper/conf/wrapper.conf VI configuration file, find the setting. MaxMemory and replace it with 12288
    Line 116 # Size (in MB) maximum Java heap wrapper.java.maxmemory = 12288
    • VI /usr/lib/vmware-vpx/sps/wrapper/conf/wrapper.conf find the setting. MaxMemory and change from 1024 to 4096
    On line 154 # Size (in MB) maximum Java heap wrapper.java.maxmemory = 4096
    • Restart the vCenter device w / DB (1000 hosts) external /embedded for lab (100 guests)

    http://KB.VMware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=2005086&sliceId=1&docTypeID=DT_KB_1_1&dialogID=294472825&StateID=1%200%20294492358

    Documentation Centre of vSphere 5.5

    PS: vCenter 6.0 has much better performance based on my beta test... so don't lose hope yet. Many improvements to come...

    PS: I've also broken down on this here until I figured this out just recently: Re: big client - vCenter 5.5 response time of the customer Web U1c / questions of Performance and Navigation

  • About a month ago I posted a question about iMovie and not being able to "share". I solved the problem thanks, so no more emails!

    About a month ago I posted a question about iMovie and not being able to "share". I solved the problem thanks, so no more emails!

    Hi Michael,

    If you want to stop receiving notifications by electronic mail, in the thread, that you have created, then I suggest that you follow the steps below:

    One time connected to the Apple Support communities, visit your mini profile and select manage subscriptions.

    Content

    To manage this content, you are currently subscribed and changing your preferences, select the content.

    Select next to see what content you are currently following.  Note that any thread you are responding you subscribe you automatically to this thread.

    You can select to terminate a subscription to a thread.

    Learn how to manage your subscriptions

    Take care.

  • Question of Adobe Reader preferences, text stretched and zoomed in.

    I a user with Adobe Reader 11.0.2 installed and cannot change its preferences and always receive a prompt "Screen reader" at the opening of a PDF file.  The window is stretched across the screen and the only way to close it is Tab - enter.  Preferences are the same way, theres no way to verify the settings, because the window is zoomed too and the text is too large. I already tried to uninstall and reinstall, deleted all the files and reg key to do a clean install as well as under several profiles. Same question every time.  Anyone else see this issue?

    AdobeImage.jpg

    Any advice would be great.

    I think I've seen it where a Windows essential police is removed.

  • How to create custom underscore and make a style that will not change the style of text when it is applied?

    Hi, I just want to know how can I create custom underscore and make a style, so that when I apply it to the text it right to point out that the article selected

    As long as no other character style is applied, you can create and apply a character style that is completely empty except for underscores. That will add an underline without affecting the text in any other way. If a different character style is already you must either add an underscore to this style definition (which will add an underline to all text formatted with this style) or make a copy of the style and add the underline, and then apply the new style.

  • Custom notifications and ringtones not available more

    I can't take when this happened, but it was last week, but custom notification and the ringtone that I put restore the default values, and the phone is no longer see them in the list.

    Initially they sounds (mp3 and wav) were in directories in the main repository, Notifications and Ringtones I moved the in the subdirectory of a music that I found online, but I still don't see them in the list.

    The only thing I've done recently is updated the built in "Themes" app.

    Someone at - it else discovered this and been able to solve the problem?

    Actually, it's funny you mention it as a reboot seemed to have worked without even seeking the .nomedia file.

    I restarted the phone between the messages and the selection is now available.

    Bug somewhere, I guess.

  • Copy and paste text messages

    Before the 10th of IOS, I could tap twice on my message text to copy it.  Now, a double tap brings up a window of options.  How can I copy text in 10 IOS?  Thank you.

    Hello mr1213,

    Thank you for your question on how to copy text in the posts here in the Apple Support communities. Yes, with iOS 10, this option has changed a bit. The double tap brings up the new options you described. If you press and hold the message you want to copy, you will get the new options menu and the option to copy or more. Here is the users iOS 10 for reference guide: iPhone iOS 10 User Guide.

    Thanks again. Have a great rest of your day.

  • user belongs to a domain and user does not belong to the local administrator or power users groups, or any custom group and the user is not part of the domain administrators group, but user show that it is admin

    WinXP
    user belongs to a domain and user does not belong to the local administrator or power users groups, or any custom group and the user is not part of the domain administrators group, but user show that it is admin

    I did a gpupdate/force and restart twice PC
    Yet, user indicate it is always admin when we right click on Start menu and see the possibility to open all users

    Hi elena_ad,

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the public on the TechNet site. Please post your question in the below link:

    http://social.technet.Microsoft.com/forums/en/winserverManagement/threads

  • Relationship between the list and ListField...

    Hey people of Java...

    I can't thank you enough for your answers because I'm really starting to "grok" the paradigm of Java.

    Another came today I'm having problems understanding I deconstruct this app MemoryDemo...

    In the screen of the demo is these two lines:

    Get and display the list of customers.
    _customerList = CustomerList.getInstance ();
    _customerListField = new MyListField (_customerList.getNumCustomerRecords ());

    Well, now I understand the first line perfectly. She develops an object with the contents of the customers it contains.

    The second line calls a custom ListField routine that I show below:

    the final private class MyListField extends ListField
    {
    public MyListField (int numEntries)
    {
    Super (numEntries);
    }

    }

    Here is the part that I don't understand:

    It seems to appeal to both the MyListField() and the super() is simply the NUMBER of elements required, but not * that * list to use.  Exactly how is MyListField() or super() knows how to use the list of customers?  I ask because this exact routine is used a few lines more later (in the part of the main screen) to do the same thing for a list of the records of the order - even once without any reference to which list to use.

    It doesn't seem to be an explicit connection or the relationship between the _customerList and ListField is building.  Is somehow deconstruct '_customerList.getNumCustomerRecords ()' to its root and use _customerList somehow?  I don't think that I changed the call to this:

    _customerListField = new MyListField (_customerList.getNumCustomerRecords ());
    _customerListField = new MyListField (PICK_A_NUMBER);

    Where the constant is: public private static final int PICK_A_NUMBER = 50;

    And he ALWAYS displays a list of customers (though now with only 50 files).  How to do know?

    Thanks in advance!

    -John

    "I guess that somewhere in the interior architecture of the ListField, he knows that he has to paint the whole - one at a time - when put on the screen - that's it."

    Fix.

    This is the great thing about ListField.  It attracts only those who are on the screen.  If you use ListField draw a list of 10,000 rows (I tested), and it will only extract and draw the 10 that he needs.

    "Again, I don't find any explicit loop where it is through each element and then calling drawListRow()."

    Good yet once, it is not there.

    "Maybe one day I'll be able to pay it back here."

    It would be great.

  • need to do a second 20 HD clip with a moving background image and the text it is flies in...

    Hi all the effects quite new based on im and the need to make a second 20 HD clip with a moving background image and the text it is flies in. I also need to create a cross-image basis. If someone could suggest the best way to do this it would be greatly appreciated. Thanks in advance

    Your question is not really explain much of what you need to achieve.  I don't know what a "cross image database", sorry.

    After Effects is a fairly complex application, and you will get much more satisfaction if you start at the beginning and learn the basics before jumping in too deeply.

  • Creating custom themes and download images in the directory is online

    Hi there everyone, it's been more than a year I visited this forum!


    My team has a period where we are required to provide a demo of our development ideas to another establishment and application development quick, that we decided to use Oracle Apex. It's good to work with her again! I want to know how to create a custom theme and download it in the development apex.oracle.com environment. Application templates need images and I usually use an FTP client like filezilla or the bitkinex to download image files in the virtual directory is in my local computer so I can use them in my designs. However, I want to create a template like this for our test area using apex.oracle.com. I'm not sure what I'm supposed to do, has anyone tried this before?

    Thank you very much
    -C

    How much space does take to application? I use a company hosting that costs $19 a month to host my APEX stuff. Allows me to ftp and download themes and other too via local ftp client...

    http://www.enciva.com/index.html

    Thank you

    Tony Miller
    Webster, TX

    What happens if you were really stalking a paranoid schizophrenic... They would know?

    If you answer this question, please mark the thread as closed and give points where won...

  • Custom for Lat/Long text field format

    I am new to the creation of PDF files and did not JavaScript for 10 years.

    I was hoping that someone would be able to provide the custom format script required format a text field for Lat/Long in DMS (e.g. 70 ° 12' 34 "W).

    Short, someone at - it a custom format script I could go and change?

    Thanks in advance!

    Try calling the function shown below in the latitude or custom Format script longitude field. This function is intended to be placed in the form of script at the level of the document.

    As a custom Format to the text box script, use the following:

    For Longitude field

    dd_to_dms (true);

    -OR-

    For Latitude field

    dd_to_dms (false);

    I was liberal with the comments in the hope of equivocation. What I have not done is a kind of data validation. The field entry is supposed to be a number that makes sense (for example, to +/-180 for longitude, +/-90 for latitude). You can add a custom script to strike to limit the entry of a number and a Validation script to check its value. He rounds as second to the second, but this could be changed if you need fractional part for seconds. Post again if you have any questions.

    function dd_to_dms (isLong) {}

    Custom Format script for text acroform field
    Convert lat/long values from decimal to degrees, Minutes, seconds
    ' DDD.dddd-> () [DD] D [M] I S [S] "N | S | E | W
    isLong: latitude, longitude = true = false

    Field blank if no entry
    If (! event.value) {}
    Event.Value = "";
    return;
    }

    Get the field as a number entry
    var val = + event.value;

    var cd, t, degrees, minutes, seconds;

    Determine what cardinal to display
    If (isLong) {}
    CD = (val< 0)="" "w"="" :="">
    } else {}
    CD = (val< 0)="" "s"="" :="">
    }

    To make the number positive
    Val = Math.abs (val);

    degrees = part of the input value
    degrees = val | 0;

    Download fractional part
    t = val 1.0%;

    minutes = fully part of (fractional part * 60)
    t = t * 60;
    minutes = t | 0;

    seconds = fully part of (the fractional part of previous * 60)
    t = t % 1.0;
    seconds = (t * 60) | 0;

    Display in the field
    Event.Value = degrees + '\u00b0' + minutes + "'"+ seconds + "\" "+ cd;»
    }

  • Creating a field of custom for a new text stamp Dymanic

    I was not able to solve this problem yet, so I'll transfer...

    I create a new dynamic custom stamp, but instead of the time, when inserted, I then have to manually enter the text in the dynamic text field.

    How can I change the script in the dynamic field of the stamp to do this? Here is a sample of what I need: (is the user input section in the boxed area)

    Complies_w_Submittal-temp.jpg

    I created the image in Word, then creates the pdf file.   Then, in Acrobat, I created a custom stamp, retrieved from the image of pdf has been created from Word, and registered as a custom stamp.  I then opened this file (C:\ < FOLDER USER > \application data\adobe\acrobat\8.0\Stamps...) and also opened a dynamic stamp as well.  I then copied the Date/time dynamic and inserted in my stamp (sending) field and tested on a pdf doc.  My Submittal w stamp / Date field / hour worked.

    So then I reopened my mailing stamp and edited text field properties and changed the custom calculation Script:

    [quote]

    var cResponse = app.response({)
    cQuestion: 'Enter the section number to appear in the stamp.',
    CTitre: 'Section number '.
    cLabel: "item number:"
    });
    If (cResponse is nothing)
    App.Alert ("thanks for trying anyway.");
    on the other
    App.Alert ("you answered, \""+cResponse+"\", for the section number")
    + "question.", 3);

    [/ quote]

    That, once I've stamped a page brought to the top of the dialog box:

    Warning.jpg

    but after I entered the data in the dialog box and 'OK' stamp, page has been stamped, but the dynamic text box was empty.

    Complies_w_Submittal-temp1.jpg

    Issues related to the:

    1-      Why was the empty dynamic text box, what don't get me?

    2-      The dialog box that appeared was titled "WARNING JavaScript window - Section number"how get rid of the 'Java Script WARNING' window?  or did I miss type something...

    3-      When you select OK, do we have an another dialog (him ' said it... ("pop up), or can we just have the inserted stamp and then after this dialog Section number?

    Yet once again, I'm not very good at all at this level of the code, so any help is appreciated...

    Thanks in advance

    And the extra character lies on a line.

    Corrected code:

    var cResponse = app.response({)
    cQuestion: 'Enter the section number to appear in the stamp.',
    CTitre: 'Section number '.
    cLabel: "item number:"
    });
    If (cResponse == null) {}
    Event.Value = "* INCORRECT *;

    }

    on the other
    Event.Value = cResponse;

Maybe you are looking for

  • Qosmio X 300 - what pre-installed software can remove

    I need to know what I can remove it and which must remain about bloatware! I would like to run the least possible, this is used for video and audio live and does not play videos with microsoft media waste! I would also like to know why 90% of the tim

  • Windows 7 on Satellite L300 - 17l - some drivers do not work

    My machine worked fine on XP but I installed the new copy of Windows 7. I installed most of the drivers and they worked, but when I come to install value added Package (in Toshiba says that VAP includes Power Saver). It seems complete installation ve

  • Why is my video 1080 p (60 fps) rough in reading?

    I shoot a lot of video on my iPhone and import into iMovie for editing. Due to playback choppy when I import video 1080 p, I always reduce the 720 p resolution in order to obtain a smooth playback. I've listed my features below, in case that's the pr

  • HP Photosmart C 310: HP Photosmart C 310

    Hello: My HP Photosmart C310 has just stopped printing in black. When I checked the estimated ink level I noticed that both black cartridges (564 black photo and printing 564xl black) show only a question mark (?) above of the level of the cartridge

  • Other driver for photosmart 7660 in windows 7 installs not - says it is not digitally signed

    New computer with windows 7.  More old hp photosmart 7660.  HP says it has no new driver, but has the other pilot. Downloaded another driver DeskJet 5600 listed as recommended.  Try to update the device manager - says my other driver is not signed di