Problem of placement for the BitmapField style

I have a subclass the Bitmapfield like this, but the HCENTER and VCENTER styles do not work.  I have a 80 x 80 bitmapfield and bimaps that are smaller than that (like 32 x 32) appear in the upper left corner of the area of 80 x 80.  I want that they focus to this area.  How can I achieve this?  (there are several ApplicationFields in the custom handler)

I can focus the image if I override the method object, but I still need the style bitmapfield FOCUSABLE.

According to me, Miss me something very easy.

public abstract class ApplicationField extends BitmapField{

        private Bitmap image;

        public ApplicationField(Bitmap image, long style) {
            super(image, Field.FOCUSABLE | Field.FIELD_HCENTER | Field.FIELD_VCENTER);
            this.image = image;
        }

        public int getPreferredHeight(){
            return 80;
        }

        public int getPreferredWidth(){
            return 80;
        }

....

That is the answer... padding!

' public void setSpace (hSpace, hspace int int) {}
super.setSpace (hSpace, hspace);
}

Tags: BlackBerry Developers

Similar Questions

  • Problem of CPU for the 90-100% svchost.exe

    When I bring my task manager, I see that svchost.exe has a really high CPU usage, it just started a few days ago and im not sure what is wrong. I tried updates automatic disableing and also I remember having the same problem with an older computer of mine, but I thought that I fixed it with the installation of an update for Windows XP (KB927891) called update can be found here http://www.microsoft.com/downloads/details.aspx?familyid=7A81B0CD-A0B9-497E-8A89-404327772E5A&displaylang=en

    I tried to install it but it tells me a new package system is already on it and there is no reason for this update. Does anyone know how to fix this?

    This problem is common for the windows operating system. I hope that this source will help you - http://fileinspect.com/fileinfo/svchost-exe/

  • Hey there, I have a problem, I paid for the creative cloud each month. 30 days ago, I downloaded the new update only in the trial version of photoshop and today the trial version has expired and I could not work with my old adobe program, although I pay f

    Hey there, I have a problem, I paid for the creative cloud each month. 30 days ago, I downloaded the new update only in the trial version of photoshop and today the trial version has expired and I could not work with my old adobe program, although I pay for it.

    Aileen,

    Please see suggestions here: FAQ: what should I do if I have a subscription, but my application acts as if I had a trial?

    Kind regards

    Guinot

  • CAN´t access my files on creative cloud. "Temporarily unavailable page. We will be back soon. "' We are working quickly to resolve the problem and apologize for the delay." Check back later or visit our website for updates of status. In addition, you can

    Hello

    Since a few days I tried to access my files on web creative cloud without success. I ve had this message only:

    "Temporarily unavailable page. We will be back soon. »
    "We are working quickly to resolve the problem and apologize for the delay."
    Check back later or visit our website for updates of status.
    In addition, you can get help in forums of the creative cloud.
    Thank you for understanding! »

    (I used Google Translate)

    Help someone?

    Not sure if you've managed to solve this problem yet or not. I do not no what are the contents of your proxy script, but it's something that you (or your company) you have to solve.

  • Paste in place for the next Master unfunction, you can fix it?

    Hello world

    I got this script, that copies of:

    Paste in Place to specify the Master Page

    I change it to:

    myDialog = app.dialogs.add var ({name: 'Copy to select one item to the next master', canCancel:true});})
    {with (MyDialog)}
    {with (dialogColumns.Add ())}
    staticTexts.add ({staticLabel: "select a master you want to copy in"});
    {with (dialogRows.Add ())}
    mySelection var = dropdowns.add ({stringList: ["master A", "B Master", "Master C", "Maître D", "master", "Master F", "Master G"], selectedIndex:0});})
    }
    }
    }
    If (myDialog.show () is true)

    main() {} function
    If ("copy to the next Master");
    copy_to_next_master();
    }
    function copy_to_next_master() {}
    If (mySelection.selectedIndex == 0) {}
    nSel var = app.selection.length;

    for (var i = 1; i < app.documents.length; i ++) {}
    var nextDoc = app.documents [i];
    If (! nSel) {alert ('nothing selected!'); exit() ;}
    for (var n = 0; n < nSel; n ++) {}
    var curSel = app.selection [n];
    curSel.duplicate (nextDoc.masterSpreads [0]);
    }
    }
    }
    Alert ("done. ("\rWhat you select are glued in place for future documents' Master A");
    }
    If (mySelection.selectedIndex == 1) {}
    nSel var = app.selection.length;

    for (var i = 1; i < app.documents.length; i ++) {}
    var nextDoc = app.documents [i];
    If (! nSel) {alert ('nothing selected!'); exit() ;}
    for (var n = 0; n < nSel; n ++) {}
    var curSel = app.selection [n];
    curSel.duplicate (nextDoc.masterSpreads [1]);
    }
    }
    Alert ("done. ("\rWhat you select are glued in place for future documents' Master B");
    }

    If (mySelection.selectedIndex == 1) {}
    nSel var = app.selection.length;

    for (var i = 1; i < app.documents.length; i ++) {}
    var nextDoc = app.documents [i];
    If (! nSel) {alert ('nothing selected!'); exit() ;}
    for (var n = 0; n < nSel; n ++) {}
    var curSel = app.selection [n];
    curSel.duplicate (nextDoc.masterSpreads [2]);
    }
    }
    Alert ("done. ("\rWhat you select are glued in place for future documents' Master C");
    }

    If (mySelection.selectedIndex == 1) {}
    nSel var = app.selection.length;

    for (var i = 1; i < app.documents.length; i ++) {}
    var nextDoc = app.documents [i];
    If (! nSel) {alert ('nothing selected!'); exit() ;}
    for (var n = 0; n < nSel; n ++) {}
    var curSel = app.selection [n];
    curSel.duplicate (nextDoc.masterSpreads [3]);
    }
    }
    Alert ("done. ("\rWhat you select are glued in place for future documents master-D");
    }

    If (mySelection.selectedIndex == 1) {}
    nSel var = app.selection.length;

    for (var i = 1; i < app.documents.length; i ++) {}
    var nextDoc = app.documents [i];
    If (! nSel) {alert ('nothing selected!'); exit() ;}
    for (var n = 0; n < nSel; n ++) {}
    var curSel = app.selection [n];
    curSel.duplicate (nextDoc.masterSpreads [4]);
    }
    }
    Alert ("done. ("\rWhat you select are glued in place for future documents master E");
    }

    If (mySelection.selectedIndex == 1) {}
    nSel var = app.selection.length;

    for (var i = 1; i < app.documents.length; i ++) {}
    var nextDoc = app.documents [i];
    If (! nSel) {alert ('nothing selected!'); exit() ;}
    for (var n = 0; n < nSel; n ++) {}
    var curSel = app.selection [n];
    curSel.duplicate (nextDoc.masterSpreads [5]);
    }
    }
    Alert ("done. ("\rWhat you select are glued in place for the next master F documents");
    }

    If (mySelection.selectedIndex == 1) {}
    nSel var = app.selection.length;

    for (var i = 1; i < app.documents.length; i ++) {}
    var nextDoc = app.documents [i];
    If (! nSel) {alert ('nothing selected!'); exit() ;}
    for (var n = 0; n < nSel; n ++) {}
    var curSel = app.selection [n];
    curSel.duplicate (nextDoc.masterSpreads [6]);
    }
    }
    Alert ("done. ("\rWhat you select are glued in place for future documents master G");
    }

    but unfunction, you can fix it?

    Thank you

    Teetan

    Hello

    Editing your code - note that the supposed main() function to be

    1. definition and

    2 called

    Compare it with this code:

    #target  indesign
    var
      myDialog = app.dialogs.add({name:"Copy Selected item(s) to chosen Master",canCancel:true}),
      mStringList = ["Master A", "Master B","Master C", "Master D", "Master E","Master F", "Master G"];
    with(myDialog){
      with(dialogColumns.add()){
      staticTexts.add({staticLabel:"Select a Master you want to copy to"});
      with(dialogRows.add()){
      var mySelection = dropdowns.add({stringList:mStringList, selectedIndex:0});
          }
      }
    }
    main();
    
    function main(){
      if (!app.documents.length || !app.selection.length)
      {
      alert( "Nothing selected!" );
      exit();
      }
      if (myDialog.show() == true)
      copy_to_next_master();
        }
    function copy_to_next_master() {
    var
      mChoice = mySelection.selectedIndex,
      mMsg = "Done.\rWhat you select is pasted in place to next documents - " + mStringList[mChoice],
      nSel = app.selection.length,
      mDone = false,
      i,n,nextDoc,curSel;   
    
    for ( i = 1; i < app.documents.length; i++) {
      nextDoc = app.documents[i];
      targetMaster = nextDoc.masterSpreads[mChoice];
      if (!targetMaster.isValid) {
      mMsg += "\rCan't detect " + mStringList[mChoice] + " in a doc: " + nextDoc.name;
      continue;
      }
      mDone = true;
      for ( n = 0; n < nSel; n++ ) {
      curSel = app.selection[n];
      curSel.duplicate( nextDoc.masterSpreads[mChoice] );
            }
      }
    mDone ? alert(mMsg) : alert("Nothing copied");
    }
    

    Jarek

  • Problem with pdf for the opening of the health gov Web site.

    Problem with pdf for the opening of the health gov Web site. I use my ipad in Safari and have installed the application to adobreader. Healthcare gov support only suggested to disable the pop-up blocker. I did, and I couldn't always open the file. No problem on a desktop computer regardless of the browser.

    In my view, they spend on their web server to a document ECM server authentication. Someone else has the problem?

    I tried the Penguin, Chrome and Atomic browsers on the ipad and the same issue.

    Thank you!

    Keren

    Okay, actually, I think that there is a problem with the type of form. It is a form of a special kind (called a form XFA or Designer, for what it's worth), which can be opened with Adobe Reader and only on Mac or Windows. There is no iPad software that can read these.

  • Is there an equivalent in Firefox for the element.style ['javaScript css_to_change']?

    I'm doing a site compatible for Firefox, but the element.style ['CSS_to_change'] doesn't seem to work (example: document.getElementById('element_ID').style [' - moz - transform "] ="rotate (90deg)"; must turn the item whose id is 'element_ID' at 90 degrees). It works in Google Chrome and I wonder if there is anything equivalent with it in Firefox...
    I'm sorry if I ask this question in the wrong place and I thank you in advance! Please let me know when you have an answer.

    Try this:

    document.getElementById('element_ID').style.setProperty('-moz-transform','rotate(90deg)','');
    javascript:void( document.getElementById('question').getElementsByTagName('IMG')[0].style.setProperty('-moz-transform','rotate(180deg)',''));
    
  • Is there a glitch or problem affecting places in the photo app?

    I started having problems last award of the locations in my photos. When I enter a location in the "Get Info" box of the card will just white (pale yellow). Also if I check the location of a photo already edited the get details pane opens with the location of map showing momentarily, then it turns off (pale yellow). Any ideas if there is a problem with the app?

    This can happen for two reasons:

    • If the location cannot be found in the database.
    • Or if the location server is not reachable.

    Test, if you assign locations all by entering a name of places for a test photo, that certainly exists in the database, like «The White House, Washington»

    If that is unsuccessful, check, if you encounter network problems, or if the antivirus software or firewall is intercepting network connection from k to the Apple servers.

    Sometimes restarting the Mac will help.

  • Why is the character for the hyperlink style appears correctly in design mode / look a/exit?

    I use RH9 and generating of WebHelp, and I needed to get into the world of the size of the font of my text for the hyperlink. I went in my stylesheet > tab character, changed the size of the police of the various parameters of characters for hyperlinks and click on apply and then OK. Normally, that would change all my hyperlink immediately text font sizes on all my subjects. However, this time, he made no changes to an existing hyperlink text, and it only affected new hyperlinks that later, I added. For existing hyperlinks, I can only manually change the size of the font of the each hyperlink, one at a time, but it's crazy (there are 100 in this help).

    Can I change successfully others character and paragraph styles. This problem only affects the character of hyperlink styles. It is also in all HR - creation mode, viewing modes and in the final output.

    Is this an indication of a sheet of corrupt style or some other combination of events I have yet to discover?

    Willam - you are absolutely right. After looking at the HTML view, somehow (I inherited a lot of this content to an earlier project), inline style has been applied to texts of hyperlink (only).

    I appreciate your suggestion of solution (if I need to regenerate my help quickly, this will be the way to do it). Otherwise, I can ask one of our maybe to programmers to write a script that will remove this topics 300 inline style or more who have hyperlinks in their!

  • Problem with script for the font change

    Hey guys,.

    You have a problem here and it has completely baffled me.

    I have two scripts;

    Change the list of fonts of Arial roasts in the entire document,
    And the other to do exactly the same thing in the paragraph styles.

    One that modifies the document works very well, one that runs through paragraph styles does not work. It simply changes all fonts that never entered last in the script.

    I downloaded a zip container file:

    1: arial fonts

    2: Rotis Fonts

    3 inDesign Document with paragraph Styles

    4: two JavaScript scripts to change fonts

    Zip file location: http://www.sbdigitalservices.com/transfers/ScriptProblem.zip

    Any help would be appreciated more that I tried to solve this problem for a few days with no joy!

    LittleMookie

    [Jongware] wrote:

    It should be

    If (app.activeDocument.paragraphStyles.appliedFont == app.fonts.item ("Rotis Semi Light Sans\t45")

    app.activeDocument.paragraphStyles [i] .appliedFont = app.fonts.item("Arial\tNarrow");

    In fact, the [i] has been replaced by the sign...

    It should be:

    app.activeDocument.paragraphStyles[i].appliedFont == app.fonts.item("Rotis Semi Sans\t45 Light")
    

    I would have written it totally differently (it interacts with InDesign much much less!):

    var doc = app.activeDocument;
    //var paraStyles = doc.paragraphStyles;// you don't want to do this if there's a chance of style groups...
    var paraStyles = doc.allParagraphStyles;// You want this instead!
    var fonts=app.fonts;
    
    for (var i=2; i		   
  • problem witththe driver for the wireless network connection card

    Quite suddenly my laptop (Toshiba) could not connect to my Modem and printer. I can only connect to the internet with a cable connection to the modem. The printer reports no problem with the connection. Troubleshooting report 'Problem with the driver for the wireless network connection card.' Problems also with ISATAP MS Driver adapter and Teredo Tunneling adapter. Software could not solve the problem.  A technician online know-how also faled to solve the problem after an hour trying everything - uninstalling and reinstalling, etc. He thought it would be a virus even though I have several active antivirus programs. Any ideas? Should I chuck the laptop away and buy a new one?

    If, as you say, you have several active antivirus running programs, they will conflict with each other and you will have no protection

    Visit the support of Tosh, specific to your model, and reinstall the drivers for the chipset and wireless

  • BlackBerry Smartphones 10 problems and issues for the 8220

    Hiya,

    I got to a point where I'm a little more frustrated on my new phone that actually enjoy it, my previous phone was a XDA Orbit running on WM5, as such, I guess I've come to expect much more than phone that's good for me...

    I just got an upgrade of the O2, and since the "BOLD" was not in stock, I was sent this one.

    Anyway, here goes:

    1 SMS Message-files: is there a way I can create folders for my messages? Say, for example: "SAVED-Bob", "SAVED-Steve", etc.? At the moment I don't have a main folder of the SMS display everything and really, I don't want to save the messages in the folder "Saved messages" under "Applications".

    2 deleting multiple messages: according to the help by pressing alt while rolling on the messages of selects messages that I want to, then pressing the menu key, I would need to select 'delete selected messages '. Well, this doesn't seem to work. If I press the alt key everything I have will achieve is the trackball goes to the top or the bottom of the messages. Could someone point me in the right direction?

    3 emails sent: why are there no 'sent' folder? I expect that, with a blackberry (which is supposed to be an office-e-mail-phone), I have a kind of box to send and sent?

    memory card 4: How can I use it? The only reasonable explanation I got the phone I got a memory card has been when I took a picture and he told me that they would be stored on the MicroSD card. But how can I as a user accessing it? How can I create folders there? How can I save items such as notes out there? And if I set up a folder on the memory card with a number of word documents, PDF files and text notes, how do I access them?

    5. Security: how lock folders such as messages or send an email (let's say for the sake of the argument I want to use the same password for each of them) so that whenever I want to access my SMS messages, I need to enter a code?

    6 editing: how can I change an image after I took it to a smaller size? I used TwitterBerry to upload a picture, I just took my twitter account, but it's just sitting there, download the image (which was a 1600 x 1200 image) for about 10 minutes (with connected WiFi) and did nothing.

    7 overview of the message: I don't want to see the message on my phone! There is no way I can just display the "New Message" icon with the sender, but not preview of the message on the screen when the phone is closed?

    8 Trackball problems: the trackball does not seem to be sitting at 100% in the middle of the cavity, instead of this he is squinted slightly to the right. It is not a huge problem, but if I see a white light shining through on the left, not the right I don't really think that it is a "function". It works and everything, but it does not appear correctly / right

    9 hinge a little wobbly? The hinge has a little movement when closed (not opening), is a movement of 2mm normal?

    10 backup complete phone: can I perform a full backup of my 8220 using any piece of software (the software that comes with it has not yet touched) completely back up my phone and contacts for a simple import into another Blackberry should I need to come back to this one for ad #8 #9?

    Thank you all so much for your time and your help on this, I would really appreciate the phone, but for now I can't and I have already spent so much time import my contacts correctly I don't really want to consider changing phones...

    Alex

    Hi and welcome to the forums!

    (1) Sms messages. You can go to the queue, options, General, options scroll down

    SMS AND email inboxes: Select distinct. You will have a record for you SMS messages.

    There is not a way to save the user, I know.

    (2) for 'gang' remove hold down SHIFT and defiler scroll messages, and then press DELETE.

    You can also scroll to the date line, select menu deletes before. This will remove all messages before

    on the date indicated.

    (3) Please indicate if you are setting up that BES (server) or BIS (telephone).

    (4) memory card. The media files that you can put on the media card will save the memory of your device. Most

    the device memory smooth your BB will run. The easiest way to manage files and data on the media

    card is to use the USB cable to access the PC and BB. Open windows 'MY Computer', will come the media card

    like a flash drive. You can then load the files in the directories right through the 'drag and drop '.  If you have a software for device OS 4.5 you have docs to go. This contains word and excel and powerpoint. For a good answer on how to use it, check out this link to read the Post of JERRYD:

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=8300&message.ID=22720#M22720

    (5) you cannot lock individual records. Password, you can protect the unit.

    (6) in the camera go to options, select photo size: large, medium, small selection.

    (7) to change the external display options:

    http://www.BlackBerry.com/BTSC/search.do?cmd=displayKC&docType=kc&externalId=KB16014&sliceId=SAL_Pub...

    8 + 9) you would have to compare with the other 8220 to see if this is a normal phenomenon, I have no access to

    a 8220.

    (10) Yes, use desktop software manager to create a backup of your phone. You can either restore

    the backup on the new phone, or use the wizard to transfer between two Blackberry switch device

    phones. This should be in the user manual.

    User Manual:

    http://NA.BlackBerry.com/eng/deliverables/3936/userguide_bb8220_gprs.PDF

    Thank you

    Don't forget to adjust your thread. Put the check mark in the green box containing your answer! Thank you

  • I want to add the new compensation method (map), problem - no form for the three digit code

    Hello.
    My old card VISA ended 07/31/2016 and I have again a wih the same number, but the diiferent expiration date + three digit code
    Problem is that I can't write only card number and expiration date, but I do not see the form of this code, I need to change, because it is not the same as on the old map.
    Can you help me?

    tz2s.jpg

    Contact support - for the link below, click on the still need help? option in the blue box below and choose the option to chat or by phone...

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html ( http://adobe.ly/19llvMN )

  • Anyone having problems just register for the test?

    I am trying to sign up for the test with a discount code by e-mail to me to do the free examination to VMware.  Once I hit the part of the exam payment then I get an application error.  I tried several times and have also requested that Pearson view directly, but their response is you must register for this test online, you can't do it by phone.

    Anyone else encounter this problem, is there a work around?

    Thank you

    Jim

    Hi Jim,.

    In order to get the review for free, you need to add the discount code provided in your e-mail by clicking on the link "add a discount" when you check out.

    Insert your code into the box, then click on 'apply reduction '.

  • Problem of color for the wall game XoniX

    Hello

    I work at the XoniX game right now

    the idea of the game is simple, several enemies move in the room, he must build walls to their smaller place

    the real problem is that I want the fill color when the wall is built

    I made this up to now

    https://appswithssl.com/Xonix/

    Here, you can move the player with w, a, s, d, and if you're going from wall to the other shape is drawn

    xonix.jpg

    you don't need to find the shortest path.  you just need to find a point of inner Quad, then use floodfill method of the bitmapdata.  in fact, it is useless even to conclude the sprites were the quad.  You can create a bitmap image in all and use floodfill and the points that are internal.

Maybe you are looking for

  • Compatibility of parts RD-XV45 vs RD-XV47 VHS

    Hi, I need help from a specialist to support dvd - vcr.I have a TOSHIBA RD-XV45, who has a broken VHS. It broke a part here:B300, P/N P000467610, REF OVMZ03773 In order to correct the VHS I need a similar device of donors. I found a model RD-XV47 for

  • Bookmarks toolbar buttons open new tabs - how to open the bookmark in the current tab?

    I have all my links bookmark bookmarks with buttons bar. However, when I click on one, it opens the page in a new tab. I want these bookmark buttons to open in the current tab.

  • Reinstallation of Win 7

    Hello! I bought the laptop Pavilion g6 with the preinstalled basic family win7. Now my hard drive is dead and I need to reinstall it on the new drive. How can I do this?

  • HP Dm1 3025DX network controller drivers are not installed after reinstalling windows

    Hello I have a laptop HP Dm1-3025DX Windows 7 home premium 64 GB and after reinstall windows from the network controller and Ethernet controller both say the drivers for the device are not installed. I can't understand how to solve this problem or do

  • Dell XPS One 2710 Fresh install

    I want to do a new install of the operating system with a new SSD, I intend to buy my 3 years old Dell XPS One 2710. It is my understanding that the Windows operating system authorization key is integrated into the motherboard. I think it is in the B