(bb10) TileList add line background

Hi all!

Is it possible to add a background picture to "by a line' to a TileList component?

I want mi TileList to have a background for each line, regardless of the number of columns on the subject. Is this possible?

Something similar to this... Can I create a background image for any container of repeating the same image to fill the height of the container?

This could help others.

I solved it this way.

Add a sprite as the first element to make it in the background.

Then add the images in either vertically as lines list.

Finally update the substantive position during the scrolling of the list.

That's all.

package com.xplota.components
{
    import com.xplota.Events.EpubEvent;
    import com.xplota.assets.Icons;

    import flash.display.Sprite;
    import flash.events.Event;

    import mx.utils.ObjectUtil;

    import qnx.events.ScrollerEvent;
    import qnx.fuse.ui.display.Image;
    import qnx.fuse.ui.events.ScrollEvent;
    import qnx.fuse.ui.listClasses.TileList;

    public class MyTileList extends TileList
    {
        private var im:Image=new Image();
        private var background:Sprite=new Sprite();

        public function MyTileList()
        {
            super();
            im.addEventListener(Event.COMPLETE, paintBackground);
            im.setImage("assets/estante2.png");
            this.addEventListener(ScrollEvent.SCROLL_MOVE, scrollMove);
        }
        override protected function init():void
        {
            this.addChild(background);
            super.init();
        }

        private function paintBackground(e:Event=null):void{
            background.removeChildren();
            var numchilds:int=Math.max(Math.ceil(this.height/this.rowHeight), this.rowCount);
            for(var i:Number=0; ibackground.numChildren){
                addImageBackground();
            }
        }
        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{
            super.updateDisplayList(unscaledWidth, unscaledHeight);
            paintBackground();
        }
    }
}

Tags: BlackBerry Developers

Similar Questions

  • How to add a background outside the body tag

    Hi I have a html site normal I want to add a background outside the body tag, IE outside the main content and on the display window.

    gradient-outside-body-content.jpg

    Thank you

    And complementary:

    Give your #container background #fff (white) and a padding-about 200 px background color.

    The padding-bottom generates a white background for the 3 labels and footer.

    My example shows the problem on a green background.

    Edit your styles.css file:

    {body

    do-family: "Helvetica Neue", Helvetica, Arial, sans-serif;

    Color: #000;

    font-size:62.5%;

    line-height: 1.5em;

    background-image: url ("your_gradient_bg.png");}

    ...

    ...

    ...

    #container {}

    Width: 1024px;

    Auto margin: 0;

    padding-bottom: 200px;

    background-color: #fff ;}

  • How can I add a background to a video of the screen I recorded from my iPhone in iMovie?

    I recorded a record on my iPhone using my macbook and quicktime on the screen. When you change this video in iMovie how can I add a background on the left and right sides. I want the prettier for downloading Youtube video.

    Thank you

    Brandon

    Have you tried the image of image in iMovie?

    You could add the background element you want the main video track, then drag your recording on the screen the second piece with overlays. Select the effect of the image in the image, and then drag the corners resize to adjust the size of your video clip:

  • Add lines - which method is the fastest

    I work with data in data acquisition and I need to add lines. I came up with two methods of getting that and as I work with pretty big blocks of data I wonder which approach is most effective. Thanks for the help.

    Both are methods of 'SLOW' and quite the same.

    If you need to go a lot faster, initialize a large array and then use the function 'replace the item.

    If you have any problem to speed the first is the simplest method.

  • How do I add lines to multicolumn listbox control

    Hi all

    the questions are as below:

    1. how to add lines to multicolumn listbox control?

    2. the message is the message of RS232 communication with hexadecimal, how to convert 2D format to fit the Ref property?

    anyboady can provides a simple example? Thank you very much.


  • How to add the background image to the screen

    Hi all

    I want to add the background image to the main screen how can I do it.

    On the main screen, I used

    -a manager of HorizontalFieldManagerField to view the bitmapField (horizontally).

    -a manager of VerticalFieldManagerField to view the bitmapField (vertically).

    already images of display screen (bitmap field) with Horizontal and Vertical Manager, but I also want to display the background image for the screen, how can I reach this help me please.

    Concerning

    Adkins

    Thanks for all the response, I tried and sloved logic here how I did

     VerticalFieldManager mainVerticalManager = new VerticalFieldManager(Manager.NON_FOCUSABLE|Manager.NO_HORIZONTAL_SCROLL|Manager.NO_VERTICAL_SCROLL){
                protected void paintBackground(Graphics graphics)
             {  
    
             }
             protected void sublayout( int maxWidth, int maxHeight )
             {
    
             }
            };
    
    then i added other to manager on to this
    

    My problem is sloved thank you for the reply

  • How to add music background and stationary to windows live mail

    How to add music background and stationary to windows live mail... IF SO... HOW?

    There may be something there, but I don't know any personally. If you have professional, enterprise or ultimate edition, you can use OE in XP mode.
     
    How to use Outlook Express in Windows 7
    http://www.oehelp.com/OEnWin7.aspx
     
    You can also hack into Windows Mail, but it is not ideal IMO.
     
    How to restore Windows Mail in Windows 7
    http://www.SevenForums.com/tutorials/5481-Windows-mail.html
    How do I activate the Windows Mail application in Windows 7
    http://www.TechSpot.com/VB/topic137494.html
  • How to add lines to the PresetEffects.xml from a script

    Hi, I would like to add a few lines in the PresetEffects.xml to another text file or an another JavaScript add lines like this how can I do? :

    < name of the group = "$$$ / AE/Preset/AnimalHead14 / = mouth" >

    < name of the cursor = "' $$$ / AE/Preset/AnimalHead14/MouthOffsetX = mouth X shift" default = '0' valid_min = '-30,000"valid_max ="30000"slider_min = slider_max"-500"= '500' precision ="1"DISPLAY_PERCENT ="true"/ >"

    < name of the cursor = "' $$$ / AE/Preset/AnimalHead14/MouthOffsetY = mouth Offset Y" default = "0" valid_min = "-30,000" valid_max = "30000" slider_min = slider_max "-500" = '500' precision = "1" DISPLAY_PERCENT = "true" / > "

    < name of the cursor = "' $$$ / AE/Preset/AnimalHead14/MouthScaleWidth = scale Overture" default = "100" valid_min = "-30,000" valid_max = "30000" slider_min = slider_max '-500' = '500' precision = "1" DISPLAY_PERCENT = "true" / > "

    < name of the cursor = "' $$$ / AE/Preset/AnimalHead14/MouthScaleHeight = scale of mouth height" default = "100" valid_min = "-30,000" valid_max = "30000" slider_min = "-500" slider_max = "500" precision = "1" DISPLAY_PERCENT = "true" / > "

    < / Group >

    < / effect >

    {function onClick.btn

    Add the lines of my text file in the PresetEffects.xml

    I did once, like this:

    var scriptEffect = {};
    scriptEffect.xml =
    
        
            
            
        
        
            
            
            
        
    ;
    scriptEffect.matchName = [email protected]();
    
    function installScriptEffect(){
    
        var ret;
        var file = new File(Folder.appPackage.absoluteURI + "/PresetEffects.xml");
        var str, idx, header, xml;
        var xmlSettings = XML.settings();
    
        XML.setSettings(XML.defaultSettings());
    
        try{
            if (!file.exists) throw "ERR_FILE_NOT_FOUND";
    
            file.open("r");
            str = file.read();
            file.close();
    
            idx = str.indexOf("");
            if (idx<0) throw "???";
    
            header = str.substring(0, idx-1);
            xml = new XML(str.substring(idx, str.length));
    
            if (!xml.contains(scriptEffect.xml)){
                xml.appendChild(scriptEffect.xml);
                if (!file.copy(new File(file.absoluteURI+".bak"))) throw "ERR_CANNOT_WRITE";
                file.open("w");
                if (!file.write(header + xml.toXMLString())) {file.close(); throw "ERR_WRITE_FAILED";};
                file.close();
                alert("Preset installed succesfully. Please restart After Effects");
                }
            else{
                alert("Preset already installed. You need to restart After Effects to make it effective.");
                };
            ret = true;
            }
        catch(e){
            file.close();
            alert(e);
            ret = false;
            };
    
        XML.setSettings(xmlSettings);
    
        return ret;
        };
    

    Then, when you want to add the effect, check with myLayer.effect.canAddProperty (scriptEffect.matchName).

    If true, nothing to do, otherwise use the installScriptEffect function. Normally, it works (haven't tried for a long time).

    Xavier

  • ADOBE Acrobat Pro DC - add lines to an existing table

    Hello. I have an existing table, I need to add lines.  Is this possible? Thanks in advance.

    It is very difficult to do something like this in a PDF file (unless it was created using LiveCycle Designer).

    You will be better off by changing the original file, and then creating a new PDF from it.

  • Using Pathfinder to add lines to a letter?

    I added straight lines on a letter (see picture attached). It's the way I want it to look, but I want to understand how to use Pathfinder or another tool to add lines in the letter. How this is done?

    Thank you.

    Screen Shot 2016-05-19 at 8.52.33 AM.png

    You could use a transparency mask and keep the direct text.

  • How to add a background image in a slidehsow yet?

    How can I add a background image in a slidehsow yet? Currently, the slide show has a black background and I wish I could change that to an image.

    You can always start first (or Photoshop) and create images with any background you choose...

  • Can I add a background color to fill &amp; sign?

    Is it possible to add a background color of an infill and sign?

    Not at the moment - you want to have a piece of text that you add when filling by & sign have a background color behind the text of the border size of the blue that you see when add you it?

    Thank you

    Josh

  • How to add lines to HotSync7.0.2?

    I've recently upgraded to 6.2 Desktop and HotSync 7.0.2. All my Palm applications seem to wear well, BUT

    I can't understand how to synchronize, 3rd party applications.

    Can I add lines? If this is not the case, how can I sync?

    Thank you!

    You could try to reinstall the desktop versions of the third-party programs, but comes perhaps not compatible with 6.2...

    You will need to check the website of the authors of software for more information.

    WyreNut

    Message relates to: Centro (AT & T)

  • How to automatically add a background/watermark to a PDF document?

    Hello!

    My name is mike and I'm working on an invoice project. The invoice is created in Microsoft Access and will be printed on the Adobe PDF printer.

    I would like to automatically add a background with graphics details (which is not possible with access in my case) in the PDF when printed on the specific PDF printer.

    Now, I have a "Preset" background and I to each time select it and save changes, that is quite a lot of time when there are multiple invoices.

    I appreciate your help and thank you in advance!

    Mike

    Hi Srv-02,

    You can create a custom action to add a watermark to all the generated PDF files.

    You can also do it through Javascript: https://acrobatusers.com/tutorials/watermarking-a-pdf-with-javascript

    Kind regards

    Rave

  • How to add a background color transition to this menu

    Hi all -

    Struggling to add transition: background color ease 0.5 s; for this menu

    http://www.ossiningdesignguild.com/RWDnav.html

    CSS is here:

    http://www.ossiningdesignguild.com/rwdnav.CSS

    I tried to add to ul li a without success and I would appreciate a helping hand.

    Thanks as always...

    Remove the bottom of the NAV UL. This State is not changing as you do not have: hover class

    You want to trigger a change on: hover ul li then add funds to that:

    NAV ul li a {}

    other styles

    Background: #222;

    -webkit-transition: context facilitated in 0.5 s.

    -moz-transition: context facilitated in 0.5 s.

    -ms-transition: context facilitated in 0.5 s.

    -o - transition: context facilitated in 0.5 s.

    transition: context facilitated in 0.5 s.

    }

    NAV ul li a: hover {}

    Background: red;

    }

    You used gradients and if you try to animate you will get them a flash, you may need to use-webkit-backface-visibility: hidden; to fix this.

    http://css-tricks.com/almanac/properties/b/backface-visibility/

    CSS3 - Webkit facilitate transitions gradients - Stack Overflow

Maybe you are looking for