TreeField focus with image problem set as background?

Hello

I have a treefield with an image as the background for its elements. Now, the problem occurs when the child is to the point. The image that is displayed as a child was similar to the text intendation. I don't want that. I want to have the entire line with the image.

No idea how to go on this issue.

Hello

This has been fixed with the TreeField invalidateNode method.

Tags: BlackBerry Developers

Similar Questions

  • A problem with Images of great CSS background

    I have two images of great background, placed at the bottom of the page. The problem with the help of the bottom property to position a picture is that browsers that don't have much height will cut upper part of the image (in my case, Santa). Here is the link:

    http://www.holidaymarket2010.com/

    By reducing the height of your browser, you can see what I mean. The image starts at the bottom of the page, so if the screen is not high enough the upper part of the image will be cut off.

    The image must be position at the bottom because the Christmas tree (piled up like a Christmas tree bulbs) is cut down. The background looks fine in most browsers, but there are many portable large screen that have less height than most of the other screens.

    Ideally, I'd like the image to start at the top of the page, as if I had used the top property position my images. So, there's the dilemma. I wonder if anyone knows of the tips of how I could pull this off. In other words, I want to position the image at the bottom of the page, but I want the lower part to be cut, not from the top, if the screen does not have enough height to display the entire image. Any ideas?

    How about you decide your BG image in two separate images, configure a container for each, and you can then position Santa on top.

  • Focus with GridFieldManager problem

    I'm having a problem of development/unfocus.  A label should draw a border of red around him when it gets the focus and a black border when he loses it.  But when I add/remove a label for a GridFieldManager (see below the code and the screenshot), I find that the update will temporarily to the field at (0,0) and 'loses' never the focus - in other words, he draws a red border, but never black.  So, I end up having 2 fields with the red border - something that should never happen!

    I'm under 5.0 SDK on Eclipse.  I reproduced the problem in the simplest possible form: If you import the following code, you'll see for yourself.  Please help me!

    Import net.rim.device.api.ui.XYEdges;
    Import net.rim.device.api.ui.component.LabelField;
    Import net.rim.device.api.ui.container.GridFieldManager;
    Import net.rim.device.api.ui.container.MainScreen;
    Import net.rim.device.api.ui.decor.Border;
    Import net.rim.device.api.ui.decor.BorderFactory;

    / public final class screen extends MyScreen
    {
    private GridFieldManager MDT;
       
    public MyScreen()
    {
    Set the displayed title of the screen
    setTitle ("MyTitle");
    int size = 3;
    GFM = new GridFieldManager (size, size, GridFieldManager.FIELD_HCENTER |) GridFieldManager.FOCUSABLE);
    for (int y = 0; y)< size;="" y++)="">
    for (int x = 0; x)< size;="" x++)="">
    LabelField nf = new LabelField ("H", LabelField.FOCUSABLE) {}
    protected boolean navigationClick (int time, int status) {}
    swap (this);
    this.setFocus ();
    Returns true;
    }

    Protected Sub onFocus (int direction) {}
    this.setBorder (BorderFactory.createSimpleBorder (new XYEdges (1,1,1,1), new XYEdges(0xFF0000,0xFF0000,0xFF0000,0xFF0000), Border.STYLE_DASHED));
    }
                       
    protected void onUnfocus () {}
    this.setBorder (BorderFactory.createSimpleBorder (XYEdges (1,1,1,1))) of new;
    }

    };
    nf.setBorder (BorderFactory.createSimpleBorder (XYEdges (1,1,1,1))) of new;
                   
    GFM. Add (NF);
    }
    }
    Add (GFM);
    }
       
    private void swap (LabelField lf) {}
    GFM. Delete (LF);
    GFM. Add (LF);
    }
    }

    Thus, even if I clicked on the intermediate element, an area of development is established around the item to (0,0)

    Why is this?

    Sorry to get to this post, this late - I could have saved a lot of traffic if I noticed it earlier...

    In any case - onUnfocus has a very strange behavior. In some cases (I don't know which) it is not called at all when the field loses focus. So, rather than using onFocus/onUnfocus pair, use FocusChangeListener. This listener will turn on the eventType and onFocus on FOCUS_GAINED work and the work of onUnfocus on FOCUS_LOST.

    Overall, it will look like this:

    import net.rim.device.api.ui.XYEdges;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.container.GridFieldManager;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.decor.Border;
    import net.rim.device.api.ui.decor.BorderFactory;
    
    public final class MyScreen extends MainScreen
    {
        private GridFieldManager gfm;
    
        public MyScreen()
        {
            // Set the displayed title of the screen
            setTitle("MyTitle");
            int size = 3;
            FocusChangeListener fcl = new FocusChangeListener() {
              public void focusChanged(Field field, int eventType) {
                switch (eventType) {
                case FOCUS_GAINED:
                  field.setBorder(BorderFactory.createSimpleBorder(new XYEdges(1,1,1,1), new XYEdges(0xFF0000,0xFF0000,0xFF0000,0xFF0000), Border.STYLE_DASHED), false);
                  break;
                case FOCUS_LOST:
                  field.setBorder(BorderFactory.createSimpleBorder(new XYEdges(1,1,1,1)), false);
                  break;
                case FOCUS_CHANGED:
                  break;
                default:
                  break;
                }
              }
            };
            gfm = new GridFieldManager(size,size,GridFieldManager.FIELD_HCENTER|GridFieldManager.FOCUSABLE);
            for (int y = 0; y < size; y++) {
                for (int x = 0; x < size; x++) {
                    LabelField nf = new LabelField("H", LabelField.FOCUSABLE) {
                        protected boolean navigationClick(int time, int status) {
                            swap(this) ;
                            this.setFocus();
                            return true;
                        }
    
                    };
                    nf.setBorder(BorderFactory.createSimpleBorder(new XYEdges(1,1,1,1)));
                    nf.setFocusListener(fcl);
    
                    gfm.add(nf);
                }
            }
            add(gfm);
        }
    
        private void swap(LabelField lf){
            gfm.delete(lf);
            gfm.add(lf);
        }
    }
    

    You will notice that I have created a FocusChangeListener to listen each LabelField and changed calls setBorder on focus has changed not update in page layout (as does not change the size of the border), which will make it much more effective and does not cause the entire screen redraw

    You can do even better if you setBorder on the ground as it is created, but use the long form - viewable one following first parameter. Define borders forVISUAL_STATE_FOCU andVISUAL_STATE_NORMA at least. Again, take a long look at prototypes withupdateLayou indicator. This way you won't have to worry about changes in development at all - the system will do it for you

  • Buttons with images, by setting the size?

    Hello

    I use the following code to add images to the buttons. However, I got some of the buttons out of the view from the window! What can I add to make them fit on the display window?

    MORE: I want them to be on the Center vertically and horizontally. Let's say I have 15 buttons, I want 3 each line. And in the center of the screen?

    And finally, is it possible to make the button selected by default as NULL? Then, key 1 is not selected at the beginning as shown in the picture as an attachment!

    * Image attached *.

    Thanks in advance

    Code:

    public class BitmapButtonField extends ButtonField {
            private Bitmap bitmap;
            private Bitmap bitmapHighlight;
            private boolean highlighted = false;
    
            public BitmapButtonField(Bitmap bitmap, Bitmap bitmapHighlight) {
                this(bitmap, bitmapHighlight, ButtonField.CONSUME_CLICK|ButtonField.FIELD_HCENTER|ButtonField.FIELD_VCENTER);
            }
    
            public BitmapButtonField(Bitmap bitmap, Bitmap bitmapHighlight, long style) {
                super(style);
                this.bitmap = bitmap;
                this.bitmapHighlight = bitmapHighlight;
            }
    
            protected void layout(int width, int height) {
                    setExtent(getPreferredWidth(), getPreferredHeight());
            }
    
            public int getPreferredWidth() {
                    return bitmap.getWidth();
            }
    
            public int getPreferredHeight() {
                    return bitmap.getHeight();
            }
    
            protected void paint(Graphics graphics) {
                    super.paint(graphics);
                    int width = bitmap.getWidth();
                    int height = bitmap.getHeight();
                    Bitmap b = bitmap;
                    if (highlighted)
                        b = bitmapHighlight;
                    graphics.drawBitmap(0, 0, width, height, b, 0, 0);
            }
    }
    

    SOLVED

    I solved by:

    1 - scaling images with display:

            public int getPreferredWidth() {
                    return Display.getWidth()/6;
            }
    
            public int getPreferredHeight() {
                    return Display.getHeight()/6;
            }
    

    2 - using HorizontalFieldManager:

    HorizontalFieldManager(FIELD_HCENTER);
    

    Thank you

  • With Image problem multicolumn Listbox entries

    Hi all.

    I am writing a script which has a multi-column list box to display information. The displayed information is charged based on a selection of drop-down list, so the option of drop down menu, different data is displayed in the listbox.

    It's that everything works fine, except when I want to include a picture for each row in a column. On the first load, the data (with picture) appear as expected. However when I change my data only the first line of the first column of data is displayed in the list (without a picture).

    Here is the code I use (under the direction of confidentiality):

    for (var i = 0; i < myData.length; i ++) {}

    myRow var = myUI.grp.p1.t1.myListBox.add ("item", myData [i].column1.columnData);

    myRow.image = File ("myIcon.png");

    myRow.subItems [0] .text = myData [i].column2.columnData;

    myRow.subItems [1] .text = myData [i].column3.columnData;

    }

    If I comment the line "myRow.image...". ', this load in the listbox to fine every time. Is this a bug or am I missing something important?

    Thank you

    Christian

    UPDATE.

    My images are in my ScriptUIPanels folder, and I was with a path relative to access, for example

    myRow.image = File ("myIcon.png");

    During the initialization of the script, After Effects assumes as these are paths on the file from which the script is run, in this case ScriptUI Panels. However, after initialization, it changes the Support files folder, where the reason why he couldn't find my images.

    If I declare a variable

    AE_SCRIPTS_FOLDER_PATH = Folder.current.fsName;

    After initialization script, I can use this as an absolute path to access my images from there where I like in the script.

    Thanks for the help!

  • Problem with the length of the background Image

    I created a page with a sidebar and main content where to cut a picture to try to get consistency for the bottom of each element.

    When I view in the Explorer of the Int, it can show different lengths between the two elements to let appear a blank space at the bottom of the screen. Problem does not occur in love with Safari or Firefox

    See the page here as an example http://revamp.pnnmanagement-events.co.uk/bands & duos.html

    In IE6, it also seems to put a space between the sidebar and the main content, which does not happen elsewhere.

    Any ideas on how to fix thanks.

    Ian

    Why do you split the image? Can not make you a wrapper for the sidebar and the maincontent and set the background image of the packaging to your image. In this way, your image doesn't have to be cut in half...

  • How to set a background image

    HY guys, I'm trying to set a background image on a Blackberry screen. I used this code, but the image dousen can't cover the full screen. Can someone me say what the problem is, or give me an example of how's done it? package mypackage;

    SerializableAttribute public class BackgroundImage extends UiApplication
    {
    Imagearriereplan private bitmap;
    fieldBitmap private bitmap;
        
    Public Shared Sub main (String [] args)
    {
    BackgroundImage PAP = new BackgroundImage();
    theApp.enterEventDispatcher ();
    }
        
    public BackgroundImage()
    {
    The background image.
    Imagearriereplan = Bitmap.getBitmapResource ("loginBackground.png");
            
    Display display = new MainScreen();
            
    HorizontalFieldManager horizontalFieldManager = HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH | nouveau HorizontalFieldManager.USE_ALL_HEIGHT) {}
                
    Override the paint method to draw the background image.
    public void paint (Graphics graphics)
    {
    Draw the background image, then paint.
    graphics.drawBitmap (0, 0, 240, 240, Imagearriereplan, 0, 0);
    Super.Paint (Graphics);
    }
                
    };
            
    The LabelField will be visible through the transparent image.
    LabelField labelField is new LabelField ("is a label");.
            
    A bitmap with a transparent image field.
    The background image will be visible through the transparent BitMapField image.
    BitmapField bitmapField = new BitmapField (Bitmap.getBitmapResource ("field.png"));

    Add the handler to the screen.
    mainScreen.add (horizontalFieldManager);
            
    Add the fields to the Manager.
    horizontalFieldManager.add (labelField);
    horizontalFieldManager.add (bitmapField);
            
    Tap on the screen.
    pushScreen (mainScreen);
    }
    }

    Thanks in advance

    You can scale the image with EncodedImage, but it is usually best to use an image with a sufficient size

  • I have a desktop white with all the icons and the taskbar, but cannot set the background.

    original title: I have a white desktop with all icons and task bar, but can't set a background. Nothing happens when I right click on the desktop to adjust only the properties please help

    We have a white desk with all the icons and taskbar. Everything I've looked up tells me to enable desktop but nothing happens when I right click so I'm unable to get the properties of office, I also tried to do system restore and also a reactivation on the desktop but nothing. Please help any suggestions would be helpful.

    Hello Carlapalsrok,

    Thanks for your post.  You experience this problem on all user accounts?  If you have not tested, try the following:

    Click Start > right click on my computer > select Manage

    Expand local users and groups

    Click on the users folder > in the right pane, right-click and select new users

    Fill in the appropriate data to create a new user account.

    To disconnect from the computer and log on as the new user

    You still see the white background?

    We can't wait to hear back on your part.

    See you soon

  • CSS code for the background of the image problem fixed

    Hello world
    I struggled for almost 2 days on and outside to try to understand why I can't get the codes for a fixed background work properly. I'll copy the code here directly and hope that someone can see what the problem is. I also give a link to the site I'm just starting to be implemented.
    http://seanshaw.NET So you can see the source code here... Any help would be greatly appreciated as I have tried 3 different versions of the code fixed background and none of them does not work for me. What Miss me? :)

    Thanks for any help on this problem... Best regards, Jo Whimzicals.com

    The code that I currently use is this one... I take you from the top to the body tag:

    <! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional / / IN".
    " http://www.w3.org/TR/html4/loose.dtd" >
    < html >
    < head >
    < style type = "text/css" >
    body
    {
    background-image:
    URL ('BckgndHome.gif');
    background-repeat:
    no-repeat;
    background-attachment:
    fixed
    }
    < / style >
    < title > Sean Shaw Art, Art of Sean Shaw < /title >
    < meta http-equiv = "Content-Type" content = text/html"; charset = iso-8859-1 ">"
    < style type = "text/css" >
    <!--
    body, td, th {}
    do-family: Verdana, Arial, Helvetica, without serif.
    }
    {body
    background-image: url(Home/BckgndHome.gif);
    }
    {.style2}
    do-size: 18px;
    color: #FFFFFF;
    }
    .style3 {color: #FFFFFF}
    ->
    < / style > < / head >

    < body >
    ==============================
    Just to clarify things, I also tried these two codes, that makes perfect sense to me, but they still do not work for me.
    ==============================
    < style type = "text/css" >
    Body {background: url (fixedbg.gif) set of Center no-repeat ;}}
    < / style >
    =======================
    ... and this one...

    < html >
    < head >

    < style type = "text/css" >
    body
    {
    background-image:
    URL ('image.gif')
    }
    < / style >

    < / head >

    < body >
    < / body >

    < / html >

    Ahhhhhhhh, Thank you VERY MUCH, ACE! I found and removed the second command line, and you were quite right... the bottom now remains in place and works perfectly. Thank you for taking the time to help me... Awesome. Have an awesome Sunday... Best regards, Jo :)))

  • Inspiron 1525 - problems with image restore factory (need help!)

    Hi all
     
    I have a problem with my Dell Inspiron 1525, I can not solve... so please help me!
     
    My Windows Vista Home Edition crashed while installing an update and now could not start more (I always get this bad blue screen during startup), so I would like to repair my laptop using the Dell factory image.
     
    I'm doing... .with related problems
     
    1. I press F8 during startup, but there is no entry "Dell factory image restore" or something like that (I even tried each one entry but nothing factory imagine restoration).
     
    2. by starting with a Ubuntu live cd, I can see that there is a partition that contains (among other files and folders) that image (:\dell\image\factory.wim) and a Tools folder where there are files imagex.exe and pcrestore.exe
     
    3 one... Using a pen drive usb bootable containing a bootable back version, I Prime the system. I also put in the usb pen, ntfspro.exe in order to read the ntfs partition
    b. I went in D:\Tools and run this command:
    > PCRestore.exe --> but I received an error message indicating that this program cannot be run in dos mode
    c. so I tried this other person (I've read here in the Forum):
    > imagex/apply c:\dell\image\factory.wim 1 c:\ --> but I got the same error as above, it is impossible to run this program in dos mode
     
    4. in addition (and I think it's weird), I tried to boot with the dvd operating system shipped by Dell with the laptop: loading at startup of Windows, but just after the progress bar (green) appears at the bottom of the screen, it blocks showing again this bad blue screen!
     
     
    Now I don't know what I can do!
     
     
    .. .Please help me!
     
    Is there a way to restore the laptop with the Dell factory image?
     
    Thank you
    Orlando

    orlando1,

    Thank you for using the Dell Community Forum.

    When you press F8 and the menu, choose the option which reads 'Repair your computer' and follow the menu to restore the system.

    This utility formats the partition of hard drive to the operating system before you restore the original image. This means data on that partition is deleted and cannot be retrieved.

    If you create a second partition with a third-party utility, Dell Factory Image Restore remains unchanged until the partition of the image is not deleted.

  • Cascades: How to set the background image for the menu drop down and etc...

    Hello

    Is there an easy way to set the background image for the menu drop down and etc, current support only black as a background?

    Thank you

    Tom.

    Welcome to the forums!

    This is currently not supported unfortunately.

    I encourage you to save a feature for this request:

    https://www.BlackBerry.com/JIRA/secure/dashboard.jspa

    See you soon!

    Martin

  • Problems with images after the subclips

    Hey there

    Today I woke up to see all subelements, I made my most recent project. Just today, footage looked more pixelated and blurry.

    What might of happened? When I stop the image the quality is exactly as it was before. But when played his more pixelated.

    Some of the images was shot at a lower resolution, but when I put the size of the screen to the appropriate resolution quality always looks bad.

    Would this have something to do with the manufacture of the subitems? Even go back and see the clips that came the subclips: the film is even more 'pixely '.

    Any help appreciated

    @

    Hi pavalanche11,

    Sorry for the problem. If it is fixed?

    Please consider these points for this problem:

    1. it looks in any case related to subitems.

    2 as you mentioned after a break the clips, they look very good, but not the same case playing; It could be linked to the resolution Pause and play in the monitor Panel.

    You can get these settings, either by clicking the exit button in the lower right of the monitor Panel or by right clicking on the items in the monitor Panel.

    3. you also said that you pulled these clips at a lower resolution. By changing the values in the resolution of reading as suggested above, they may work properly.

    Here is the text of pdf help Prelude:

    Some formats are difficult to display in full motion by reason of their high compression or broadband playback. A lower resolution playback faster but at the expense of the quality of the image. This compromise is particularly visible when you view the other H.264 and AVCHD-based codec of the media. Less than full resolution these formats have turned off error correction, and artifacts are common during playback. These artifacts, however, do not appear in the exported media.

    Use separate reading and resolutions of break to better control the monitoring experience. With images high resolution, resolution of the reading to a lower value (for example, 1/4) for smooth playback and the resolution of the break in full. These settings allow you to check the quality of the details of development or the edge when you stop playing. Cleaning put the monitor resolution of reading, stop no resolution.

    I hope it helps. Customer feedback is important to us. Continue to write in the case of any confusion.

    Thank you

    Mayjain

  • Problems with images in Muse

    We have at any given time 2 or 3 photos on our website that half is cutting.  Go Daddy, we use for our accommodation.  The lower half of the space allocated for the image is gray or white.  We have removed the images several times, that she replaced, re added the same photo, troquee the spaced which image goes where and whenever we have repeat the site 2-3 images are cut.

    Our Muse and BC are perfect, the question is considered only in line on the published site.  It is not always the same place or the affected image, but as soon as we fix one, another Cup.  I am unable to put screenshots here but would be happy to send an email to someone who can help.

    Portfolio

    The link above is to the portfolio page on our site where we had the question.  At that time, upward, stainless steel countertops is cut, 2-3 of the way down the page, the image of cable railings and planter boxes is cut and further down is so the footrest bar. It is meaningless, as soon as fix us an image that another task is assigned.  Once we have removed the pictures and re added, we had images in different places, we used different images - at any given time, there are 2-3 pictures with the bottom half cut.

    Go Daddy told me that our text has been added as an image with brightfield, and our images have been added as a backdrop, background display 'options' not 'image options.  This is not correct, our test is added as text, and we can change it.  Our images are added in the form of images, with "image options.  I'm on the phone with Go Daddy right now (one representing different of course) and they tell me that he could not have told me that they do not have a way to see the 'options' we would.  So I'm really pleading just for anyone who thinks they can help give a shot - please and thank you!

    Cutting on the website photos

    Here is a link when we have asked this question previously but ceased to answers

    As mentioned in the previous post and you mentioned that it works in British Colombia, please provide the url of the BC site too which might help in the investigation.

    Thank you

    Sanjit

  • How to set the background of a JPanel with its previous content?

    Hello
    I have a JFrame that contains some JPanels. Off all the JPanel, a JPanel is a graphical object (Graphics g) with the paintComponent method to paint a picture of Graphics2D in this JPanel. After the complete picture, I want don't want to paint the same thing over and over again (repaint() does it for me automatically). I want to put that final image generated in the background of the JPanel.

    I have an idea, but I want to discuss. What I can do is, after you have completed the image, I can use
    BufferedImage screenShot = newRobot().createScreenCapture(rectangle);
    for the JPanel screenshot rectangle specified. After that, I can put this BufferedImage to the JPanel. Is - this way? or should he require changes?

    Thank you.

    Do not create a screenshot. Build a BufferedImage of the same size that the Group of experts and of a suitable type, get its graphics and call paintComponent (...) of the Panel with the graphics of the BufferedImage. He painted the Panel in the BufferedImage.

    Passage to Java2D for better alignment of the section.

    DB

  • Problem with image .png in black boxes in InDesign

    Hello

    I hope someone can help me with a problem I have with some .png files.  When I try to put some .png files in my InDesign document, they come as just the black boxes.  The .png files are created by a third-party application, (w/MathFlow EditLive) but if I view the .png files in Fireworks or other viewers the image, they seem to be fine.  I tried to look at the properties of the image inside InDesign, to see if distorting them, it might work, but I'm not a graphic designer by trade so my knowledge is rather limited.  Any help would be greatly appreciated.

    Data sheet:

    Windows XP

    Suite CS4 including:

    Adobe InDesign CS4

    Fireworks CS4

    Thank you

    Josh

    Is it possible that some of the png have Alpha channels? Can you open in Photoshop and save as png? What happens when you put these files?

Maybe you are looking for

  • IOS 10.0.2: Headphone audio controls of temporarily unemployed

    According to the release notes for IOS 10.0.2, apple has fixed a problem that could prevent the audio controls headphones temporarily unemployed. but the problem is not resolved for my iphone 6 s more and today that I got the problem for wireless Bea

  • iMac - 10.11.4 - Bluetooth problem

    Hello I have 27 "iMac end of 2015 and it used to work great, but last month after put 10.11.4 at level, bluetooth does not work. I need to connect the cable to the keyboard on the first that I need to force restart of the keyboard and bluetooth back

  • Qosmio e10: fan on constantly

    Hey all - after 20 months it was time to rebuld my Qosmio and so went the restore disc. and we are all back online. Unfortunately now - cooling fan is on constantly. and so the battery life isn't the best.No idea why?I went through the various utilit

  • Repeat the updates of Windows

    Hello.. I use XP Professional version 2002 service pack 3. My laptop is to install the below 3 updates repeatly so many times and without stopping. Initializing installation... done!Installation of Microsoft .NET Framework 3.5 SP1 and .NET Framework

  • computer won't turn on... back lights but not seeing in front.

    I lent my laptop to a friend for a few days, came back and now I can't even turn it on.  The light at the back of the tower but it didn't but not forward... He won't do anything.  No screen or anything.  Help!  Worked great until I lent it.  Windows