Nasty problem with resizing a list and a class custom CellRenderer

Create a list (_myList) in a class with a custom CellRenderer class. In the custom CellRenderer class, I draw a rectangle with a gradient in the data() function:

override public function set data (value:Object) : void
{
    super.data = value;

    var tab_color:Array = this.data.rowColor;
    ...
    _matrix.createGradientBox(this.width, this.height, 90/180*Math.PI);

    with (_sprTab.graphics)
    {
        clear();
        beginGradientFill(GradientType.LINEAR, [tab_color[0], tab_color[1], tab_color[2]], [alpha,alpha,alpha], [0,127,255], _matrix);
        drawRoundRectComplex(0, 0, this.width, this.height, 15, 0, 15, 0);
        endFill();
    }
    ...
}

When policy changes I want to resize the list. Therefore, in a function in the class in which the list is created, I resize the list:

public function setListSize (w:Number, h:Number) : void
{
    _myList.setSize(w, h);
}

And this function is called with the new dimensions on the change of orientation in the main class.

However, this.width in the custom CellRenderer class does not get the new width of list a reason any.

No idea why?

You must refresh the visible items in the list. You can loop through the list and replaceItem (...) of the call and who should do it. You can check that it would work by scrolling through the list of invisible items and they should have picked up the new width.

Tags: BlackBerry Developers

Similar Questions

  • problems with customization select lists and popup LOVs

    Hello


    I have 2 problems on selection lists and popup LOVs.

    The first is on a list in tabular form.
    It must be created with APEX_ITEM. SELECT_LIST_FROM_LOV or similar and take its values of a named LOV.
    This worked fine, but now it should also have the possibility to enter a free value.
    I tried to accomplish this by creating an APEX_ITEM. POPUP_FROM_LOV, but there is a problem with the function which is called the icon of the right arrow to the input field (for eg. genList_f11_5()).
    If the line is added by addRow, then it works fine, but if the line is not empty
    Then the function call is as genList_f11_$ _row () and the input field becomes worthless, when an LOV is selected.


    The other problem is on a list of selection that should have the opportunity to enter a custom value and
    It should also be able to select multiple values. I tried to implement this in a text box that contains the selected values, and a multiple select list, with an event handler in each option. The user can click on options and they would be copied into the text box. The problem is that I couldn't make the event handler works in Internet Explorer.

    I would like ideas on one of these problems.



    Tiina

    Hello

    It can be created at APEX_ITEM. TEXT.
    APEX_ITEM also generates the name attribute that I use the jQuery selector in the sample.
    Use jQuery UI autocomplete just similarly as in my example with APEX_ITEM

    Kind regards
    Jari

  • problem with resizing and remove

    I have a problem with resizing images after loading, not all of the images has the scale ratio 0.75... so for the most part, I just stretch the images having the ratio...

    is there a good method of resizing/scalling? for example enjoyed.

    and once I've loaded images, I add in the imageContainer.

    I couldn't find a way, if I click on the next thumbnail, she remove the last child (image) of the imageContainer...

    I'm confuse ATM please point me in the right direction...

    Thank you

    Load the image clicked

    function mouseClickThumb (e: Event): void {}

    var thumb: thumbnail2 = e.target as thumbnail2;

    var linkName:String = e.currentTarget.name.toString (); get the name of the link

    var imageLoader:Loader = new Loader();

    var urlRequest:URLRequest = new URLRequest (linkName);

    imageLoader.load (urlRequest);

    imageLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, imageLoaded);

    function imageLoaded(e:Event):void {}

    var image: Bitmap = (e.target.content) Bitmap image;

    image.x = 0;

    image.y = 0;

    somehow if I resized the images here, it didn't turn right for all...

         }

    imageContainer.addChild (imageLoader);  / / How can I delete the last image? if click on the following icon?

    }

    If you want to remove the last (highest in the display list) child of a container, you can do this way:

    var numChild = imageContainer.numChildren ();

    imageContainer.removeChildAt (numChild - 1);

    don't forget display lists starts with 0, not 1, so you must always subtract 1 to get the level number of the child in the foreground

  • Problems with media player 11 and all other players, playing music is broken?

    Problems with media player 11 and all other players, playing music is broken?

    Hi all

    I have a big sound even and odd / problem reading music?

    My computer using windows media player 11 and classic media windows and others to play my music in the hard lists recorded by windows media player 11 copied from my CD.

    But here's the weird problem that only started to happen now, when I play music saved on any one of the players of the computer the sound breaks sometimes but not always?

    Even if I try tp use players like windows media player 11 to play recorded video clips sound breaks toward the top, but the video image only?

    I have a newly completed with windows xp home system and service pack 3, and all memory and material necessary for a pc game of level, a new graphics card was installed and by the way the problem of noise was there before this was done?

    I don't know what is the fault? And I don't know how to find out what the required audio driver are for his computer system I?

    I tried the right click on the audio device to see if the pilot could be updated in case that's all? All he asks is a cd or a floppy disk, but I thought you could ask to search for drivers online too?

    He even now breaks the game sounds too!

    Help, please

    If you access Windows Update (start - programs - Windows Update), you can
    see if there is a newer driver. The drivers are optional updates are not so made
    automatically.
     
    Download the driver for your audio hardware manufacturer (or motherboard if
    "It's built-in sound). They are often newer than Windows Update.
     
    This explains how to disable the improvements.
    http://Windows.Microsoft.com/en-us/Windows-Vista/how-do-I-stop-my-music-from-skipping-or-breaking-up-when-I-play-it
     
     
     
    --
    ..
    --
    "zorkspacer" wrote in message news: 9bd0240a-60ba-4186-a47f-38d6b3f88ddb...
    > Problems with media player 11 and all other players, playing music is
    > broken?
    >
    > Hi all,
    >
    > I have a big sound even and odd / problem reading music?
    >
    > My computer using windows media player 11 and windows classic media and
    > others to play my music in the hard lists recorded by windows
    > media player 11 copied from my CD.
    >
    > But here's the weird problem that only started to happen now when I
    > play music saved on any one of the players of the computer sound
    > breaks sometimes but not always?
    >
    > Even if I try tp use players like the windows media player 11 to play
    > saved video clips, sound breaks toward the top, but the video image only?
    >
    > I have a newly finished system with windows xp and service pack 3 home, more
    > all the memory and the material necessary for a pc level game, new graphics
    > card has been installed, and by the way that the noise problem was there before
    > who did?
    >
    > I don't know what is the fault? And I don't know how to find out what the
    > driver needed sound are for his computer system I?
    >
    > I tried the right click on the audio device to see if the driver could be
    > update in the case where that's all? But everything he asks a cd or a floppy disk, but I
    > thought you might ask it to search for drivers online too?
    >
    > It even now breaks the game sounds too!
    >
    > Please help
    >
     
     
  • Problems with the Precision M4400 and the graphic card Nvidia quadro 770M

    I have a problem with my Precision M4400 and Nvidia Quadro 770 M. After I installed Windows 7 64 bit, I have problems with the graphics card. I get a blue screen or graphic errors. I tried several versions of the driver. In the Nvidia forum had this problem even more. Here, they told me that only a BIOS update for the graphics card to solve the problem. Update the BIOS, but I should refer by DELL. So my question is this problem with Dell is also known, and there is already an update of the BIOS to the Quadro 770 M?

    Hi all

    I have the solution by chance. I was looking for the latest drivers GeForce for Windows 7 x 64 and I read the accompanying note: http://fr.download.nvidia.com/Windows/337.88/337.88-win8-win7-notebook-release-notes.pdf
    On page 17, you can read the following note to fix: "[GeForce FX 770 M] [portable]: blocking of the blue screen occurs after Windows starts."

    Of course, GeForce FX 770 M does not exist (and never was), and it should be Quadro FX 770 M. I can bet that nVidia has corrected this famous BSOD problem in the wrong driver because always there is nothing about any "Quadro FX 770 M - fix" in the note accompanying the latest Quadro (340.52) driver.

    You try the GeForce driver above, but to install it, you may need to download an INF file modified with the addition of the ID of Quadro FX 770 M (= "NVIDIA_DEV.065C ="NVIDIA Quadro FX 770 M"). Try without the first modified INF file because the Quadro FX 770 M is listed as a compatible chip in the version of the driver GeForce 337.88 note...

    I'll try that, even though I am completely sastified with the latest driver for Quadro (feasible) (285.62) without disable Powermizer. I did not try the latest Quadro drivers again (to be honest).

    Late me know please.

  • Problem with resizing table InDesign CS5

    I have problems with resizing of tables in InDesign CS5.

    The width can be entered and a decrease, but the right height do move up nor down when you pull in the lower right corner or anywhere else on the base of the columns.

    Does anyone else have this problem?

    Is it a bug or maybe just me not understanding things correctly in the help...?

    Any contribution is appreciated if you knock out. :-)

    Document corruption is sometimes disabled by exporting for Exchange. See remove minor corruption by exporting

  • Problem with styles of framework and the paragraph of text

    I have a book with a number of documents in it. In one of the documents, there is a problem with blocks of text and paragraph styles. When I create a new text frame, text in it and apply a paragraph style, the style does not apply correctly. Elements of applied and others do not. For example, bullets and numbered lists apply but italic, and font size are not. It only happens with new blocks of text, and the oldest work very well.

    This does not happen in other documents, just one.

    The book is properly synchronized and synchronization options include all options.

    Check your panels styles, paragraph, character and the object with nothing selected. If there is an already established style name, and I think that it would be in the Panel character styles, that's your problem.

    Bob

  • Hello, I have a problem with Mozilla Firefox 14 and now also Firefox 15. When I click on .html files on my desktop, firefox will open a new window twice. Where is the th

    Hello, I have a problem with Mozilla Firefox 14 and now also Firefox 15. When I click on .html files on my desktop, firefox will open a new window twice. Where is the problem? Thank you

    That may be a problem with the DDE.

    Try to undo and redo Firefox as default browser.

    Make a different browser like IE browser by default and then let Firefox do it again.

    See:

  • Are there problems with Firefox 5.0 and 1Password 3.6.1?

    I started to update to Firefox 5.0 and noticed a message that the 1Password version I had at the time would not work with Firefox 5.0.
    Are there problems with Firefox 5.0 and 1Password 3.6.1?

    They say you need 1Password 3.6.0 or later to work with Firefox 5.0

    http://Forum.agile.WS/index.php?/topic/5319-Firefox-5-requires-1Password-360-or-later/

    http://help.agilebits.com/1Password3/firefox.html
    
  • Someone at - he had problems with 9.2.1 and pairing Bluetooth devices?  My iPhone will not be connected or pair of devices.  Devices to recognize the iPhone 6, but the will of the iPhone 6 does not recognize the device.  Is there a problem with 9.2.1?

    Someone at - he had problems with 9.2.1 and pairing Bluetooth devices?  My iPhone will not be connected or pair of devices.  Devices to recognize the iPhone 6, but the will of the iPhone 6 does not recognize the device.  Is there a problem with 9.2.1?

    Kev2012 wrote:

    Someone at - he had problems with 9.2.1 and pairing Bluetooth devices?  My iPhone will not be connected or pair of devices.  Devices to recognize the iPhone 6, but the will of the iPhone 6 does not recognize the device.  Is there a problem with 9.2.1?

    It would depend on what you're trying to link to?

    Here are the supported Bluetooth profiles an Apple device can connect to iOS: Bluetooth profiles supported - Apple Support

  • Equium L10: Problem with the main battery and battery RTC

    Hello

    I have the Toshiba Equium L10 and it is about 14 months old and I have problems with the battery and how much time it takes after a full charge. I also have problems with the RTC battery and an ERROR 0271: check date and time settings message when I turn on the laptop.

    Regarding the battery, I can fully charge it upward in about 3 hours, but when I start to use it, apparently in the last few hours around one and a half or so and then it needs to be recharged. I can have down for about 40 minutes and then turn it off and come back later or in a day or two. How long should I expect from a fully charged battery?

    About the batttery RTC, it really becomes a pain and I only started to get the message of the ERROR 0271 start-up, in recent weeks. I can charge the battery pack and then leave for a few days, but when I turn it on, I get the message ERROR 0271 on the date and time incorrect. Surely after a full charge, the RTC battery should last longer than a few days?

    The manual says that if the RTC battery is exhausted or becomes weak, you must charge the battery of the CCF for 24 hours, in a different part of this manual indicates between 24 and 48 hours, but how can load you for long when the sections concerning the charging battery pack status after charging the battery you unplug the power adapter because leaving connected will shorten the life expectancy of the Battery Pack. So, how we can charge the battery of the CCF for 24 to 48 hours if we shouldn't leave the AC adapter plugged in once the battery is charged - which is nearly three hours. Suggestions about these problems would be appreciated.

    Besides we all know that it is easy to change the CMOS/RTC battery in your desktop base unit, but is it easy to change in a Toshiba Equium L10?

    Concerning

    Brave0

    Hi Brave0,

    The normal recommendation for the CMOS (RTC) battery is to leave the laptop connected to the power supply at least 12 hours when the main battery is fully charged. The charging circuit is going to hijack the current to the load automatically RTC battery and no current will be forwarded to your main battery.

    Recommendation do not leave the power adapter is plugged in the main battery is fully charged is really only applicable to older laptops that used no batteries Li - ion and therefore they had to be completely discharged before recharging to avoid any effect 'memory' of the battery.

    With modern Li-ion batteries, it is quite safe to leave the battery when fully charged and still power the laptop from the AC adapter. The charging circuit will pass all the battery charge if it is fully charged.

    Kind regards

  • There is a problem with my payment information and I can't configure any application I want to remove my information from my icloud account payment

    There is a problem with my payment information and I can't configure any application I want to remove my information from my icloud account payment

    There are no withdrawal, must be replaced and released.

  • problem with the Finder - files and folders displaying incorrectly

    After acquiring a new iMac, I noticed a problem with the Finder - files and folders are displayed wrong (see table).

    This is what happens always after the files have been transferred from one folder to another. I was reminded of my days of using Mac OS in the 1980s when automatic setting of files was not so "automatic." I use Mac OS for decades and I don't remember the last time I had to think about GUI problems like that.

    Other problems in the graphical display of files and folders were introduced, such as when you have hundreds of files in a single folder, you end up deleting about 30 to 40 of them say in a particular section, and you end up with gaps of the ChartSpace where files used to be, that is the remaining files automatically rearrange themselves (fill in these gaps) - never. A week later, you open the folder, and the gap of GUI is still there.

    I decided to do a clean install of the operating system but nothing works.

    Is there some setting in Prefs I'm missing?

    Hi there highland99,

    Looks like your folder icons are not accommodating themselves automatically you plan to do. To me, this indicates that you have organize by the None value in the view menu. You can change the way files and folders are prepared automatically by clicking on view > reorganize by and selecting how you would like that fixed.

    Thank you for using communities of Apple Support.

  • I'm having a problem with Windows7 Home Premium and WWII CFS joystick operation. I get a message saying that the controller has been changed. Microsoft offers a patch?

    I have problems with Windows7 Home Premium and WWII CFS joystick operation.  I get a message from gibberish, saying that the controller has been changed.  I tried to replace the file with a version of Windows XP .cfg and also tried to re-write the .cfg file.  Apparently, this version of Windows will not allow a file to be saved with an extension ".cfg", so it does not work either.  Any suggestion would be appreciated.

    Thank you

    Hi Bob,

    You can consult the following links of wire and check if it helps.

    Joystick does not work with the Europe of WWII Combat Flight Simulator series. Help?

    With the help of WW2 Europe Combat Flight Simulator series with Windows 7 Home Premium

    Note: The above links contain third party links. Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

  • Problem with Quicken 2012 House and the company after installation, runtime error

    I have a problem with my Quicken home and business 2012. I upgraded from 2009 to 2012 and was able to use the new version for about 1 hour, but he hung a little.  Now when I tent to access my Quicken program, I get a runtime error "program: C:\Program Files\Quicken\qw.exe ' abnormal program termination. Quicken is then stopped immediately.  I am currently running Windows XP service pack 3.  Any suggestions?

    Hi RENEE HETTERLY,.

    I suggest that you uninstall and reinstall Quicken program on the computer, check to see if it helps.

    How to change or remove a program in Windows XP

    http://support.Microsoft.com/kb/307895

    If the previous step fails, then you will need to contact Quicken support for assistance.

    http://Quicken.Intuit.com/support/Windows.jsp

Maybe you are looking for