Scroll horizontally AND vertically?

I defined a list() and set the width to a specific value. This list scrolls vertically. It is possible to add an entry that exceeds the width of the list. What would be the recommended method to make the entire list visible input text?

Hey eugenevk,

Yes sorry for that one. I did not consider what happens when a user had to update the list. the onAdded() method is called only once when the list is first added to the screen, and the method will never be called subsequently. because of this our manipulations of label are not made when we need to be done the next time. to solve this problem rather than the onAdded() method, we will override the method drawLabel() of the display of the cell. This method is called everyime, that a label is changed. One thing to remember is that most of this is conjecture based on the latest discussions of the forum. Unfortunately, RIM has not disclosed any information about their cell converters and we've just been fiddling around haha. That being said if you find bugs let us here on the forums know and we will try to fix it

Try the following new code:

MyCustomCellRenderer.as:

package{    import flash.text.TextFieldAutoSize;

    import qnx.ui.listClasses.AlternatingCellRenderer;

    public class MyCustomCellRenderer extends AlternatingCellRenderer    {        public function MyCustomCellRenderer()        {            super();        }        override protected function drawLabel():void        {            super.drawLabel();

            /*             * Add the check for a label object. Sometimes this             * function is called via the draw function prematurely            */

            if (this.label != null)            {

                /*                * If the width of the text (in pixels) is larger than the width                 * of the cell perform the cut off                */                if (this.label.textWidth > this.width)                {                    /*                    * Get the character per pixel (charPerPixel) value to use later when                    * we want to calculate how many MAX characters can show up in one row.                    */                    var charPerPixel:Number = this.label.text.length / this.label.textWidth;

                    /*                    * Calculate the max amount of characters to show on screen.                    * - 3 to accomodate for the leading dots (...)                    */                    var charMax:int = Math.floor(charPerPixel * this.width) - 3;

                    this.label.text = this.label.text.substr(0,charMax) + "...";

                }            }

        }    }}

Hope that helps. Good luck!

on a side note: it seems to be a problem, I just noticed that it doenst correctly calculate the width of the cell. ill try to fix this, but for now the above code should do. I'll keep you in the loop!

EDIT: There was an error in the code, updated with the correct code.

Tags: BlackBerry Developers

Similar Questions

  • Disable the horizontal and vertical scroll bars

    Hello...


    I have to disable the horizontal scroll bars and vertical in the text field, is this possible?



    Please your help as soon as POSSIBLE.

    Murray,

    I understand that u don't want to take the time to review this question so evil "forgive" non-response gave you (I don't thnk so) that doenst help everyone.
    But if you answer and say its impossible when it IS possible I have to correct you.
    I did a testpage and it works as I have said, he would.

    http://www.superficial.nl/examples/textarea.htm

    So please if you do not want to give the answers that clarify anything, just do not...
    Then was wrong and click on the link above...

    GL,
    Superficial

  • my information does not match the screen. I have to scroll sideways and vertically for all to see

    my information does not match the screen.  I have to scroll sideways and vertically for all to see

    How can I change the size if it is adapted to the screen?

    Hi Marilyndunn,

    ·         are what application you referring?

    ·         It occurs on all applications?

    ·         If it works well before?

    ·         Did you do changes on the computer before the show?

    You can see the following article for more information about the display settings.

    Get the best display on your monitor

    http://Windows.Microsoft.com/en-us/Windows-Vista/getting-the-best-display-on-your-monitor

     

    Make the computer easier to see (optimize visual display)

    http://Windows.Microsoft.com/en-us/Windows-Vista/make-the-computer-easier-to-see-optimize-visual-display

    Hope this information helps.

  • How to get the angles of view (horizontal and vertical) camera?

    How to get the angles of view (horizontal and vertical) camera?

    The horizontal and vertical field of VIEW properties are available with the camera_get_physical_property() function.

    Who is using the C API of the photo. I don't think that you can access by using the control of the camera of Cascades.

  • AI CC, horizontal and vertical guide lines disappear when aligning

    Hello

    I think I'm exactly as shown. I work with the rules and guidelines. My goal is to start from the upper left corner of the document (white Virgin) and drag the horizontal and vertical guidelines at the same time. Then I press Ctrl + R to hide the ruler guides, use the black arrow to select the guides that intersect (they turn blue), and align the center of vertical positioning. They should then be centered horizontally and vertically, but they disappear completely. I rebooted HAVE him, but that did not help. Kindly help, if I'm having trouble with this... Geez!

    Thanks in advance,

    Janice

    I experienced this with someone a few months ago, and we understand that they are no longer work as expected. After that you align the guides by following the steps you sketched out, zoom all the way (control-) until you can see the full editing table. They are way out of your sight.

    As an alternative, until it works again, note the height and width of the artboard and divide by 2. Use the numbers that result to position the guides manually.

  • Both horizontal and vertical tabular of freezing...

    Hello

    I use Apex version 4.2.6... In table form, I need to freeze the column headings (horizontal gel) as well as the lines of the columns (vertical gel),

    I tried for vertical gel well come... But I don't know about header freeze... is it possible to freeze both in tabular form? If Yes, then please guide throw me it

    Thank you

    Infantraj.A

    Hi Infantraj,

    Infantraj wrote:

    I use Apex version 4.2.6... In table form, I need to freeze the column headings (horizontal gel) as well as the lines of the columns (vertical gel),

    I tried for vertical gel well come... But I don't know about header freeze... is it possible to freeze both in tabular form? If Yes, then please guide throw me it

    Here is the post from blog by Jari wool, where he showed both freeze headers and freeze columns in the classic report:

    http://jaris.blogsite.org/Apex/f?p=blog:read:0:article:303800346302715

    Just download the sample application provided by Jari, upload it to your environment and use it to tabular form (as classic and as a report for the most use of the same model, i.e. the Standard). You can see the working example as well.

    Years ago, I did both the horizontal and vertical gel by twisting Jari earlier blog post.

    Reference: Re: how to freeze report tabuar headers and forms in APEX 4.1

    I hope this helps!

    Kind regards

    Kiran

  • [SOLVED] Headers of columns (horizontal and vertical) Center

    Hello.

    I use JDeveloper 11.1.1.7.0

    I need to center headers of columns (horizontal and vertical), a < af:column... > classic within a < af:table >

    It is very important that one header is centered. The content could be left, Center or right-aligned.

    I tried this solution to another thread (alignment of the column header in the table of the ADF in the Center), but it does not work:

    <f:facet name="header">
        <afh:rowLayout>
            <afh:cellFormat halign="center">
                <af:outputText value="column header"/>
            </afh:cellFormat>
        </afh:rowLayout>
    </f:facet>
    
    

    Any suggestion? Thank you

    The solution is for JDev10g.

    Have you tried the alternative

    Set the align of af: column in the Center, it aligns the header and the data at the same time in the Center, if you only want the header to the Center, the inlineStyle value ' text-align: left;' in addition to the align property

    Timo

  • horizontal and vertical flip of an image

    I duplicated old color slides by taking pictures of them with a macro lens. I only shot raw files, not jpg additional in order to save storage but otherwise to keep the range of post-processing possible. Worked well but the photos should be horizontally and vertically returned. Is it possible to LR4.4 automatically.

    To check all the images, then choose "horizontal reversal" only works on the first of the images activated.

    You can make several photo flips to develop if you enable automatic synchronization.  Just make sure to turn it off because it can cause all sorts of accidental damage

  • How can I recover the functions drag horizontal and vertical to center the portions of the image being developed? [was: Question]

    How can I recover the functions drag horizontal and vertical to center the portions of the image being developed?

    1 - question double deleted

    2 the name of the program you are using then a moderator may move this message to the correct program forum

    This forum Cloud is not on the program problem... help a program would be Photoshop Lighroom or Muse or?

  • Is it possible to do a slide show or a presentation without the discoloration (and l horizontal and vertical) so no transition at all?

    Is it possible to do a slide show or a presentation without the discoloration (and l horizontal and vertical) so no transition at all?

    (I want my dog to "run" more easily through the Web page in a slide show very fast)

    Hello

    You can set the transition to one of the three options available (bland, vertical and horizontal) and set the speed of transition to "0". This would remove all kinds of your slideshow transition effects.

    Please refer to this screenshot:- http://prntscr.com/4rdaqm

    Hope this helps

    Kind regards

    Rohit Nair

  • Horizontal and Vertical alignment / webcamSub

    How to control the alignment, horizontal and vertical of users within the webcamSub?

    Here is the result with the old and the new ACC webcamSub.

    1.jpg

    2.jpg

    Thank you

    Bernard

    Hi Bernard,.

    Sorry fot the inconvenience - part of the webcamsubscriber, we made a few changes to the layout system, in order to make them easier to control. So it is perhaps not as good in guessing the page layout that you want to automatically, but you will be much more easily able to force them to do exactly what you want.

    Here is the new property added to webcamSubscriber:

    usersPerRow:int[read-write]


    Specifies the number of the user to display per line in the webcamsubscriber videos. Once the number of videos to display exceeds this number, a new line is created with videos of excess. By default, 4. For a horizontal long band, this game at a high number - to a vertical strip, put on a low number.

    For your case, simply set usersPerRow to 1, so this will lay vertically.

    hope that helps,

    Nigel

  • Text in centered DIV horizontally and vertically.

    I made a bar of simple navigation at the bottom of a site that I am building and had it centered horizontally and vertically.  When I pulled the top of the page now the text is completely to the left and I had no problem with him the day before. I made no changes to the code. I use IE9, but I've been since I started this site. Everything looks fine in Firefox. If I approached IE9 compatibility mode, it is centered horizontally but not vertically. Any ideas?

    http://www.toddsshowcase.com/

    http://www.toddsshowcase.com/styles/stylesheet.CSS

    Just add height: 90px; and line-height: 90px; to your 'bottom_menu' of the selector css (as shown below)

    {#bottom_menu}
    text-align: center;
    Width: 974px;
    margin: 0px auto;
    Clear: both;
    height: 90px;
    line-height: 90px;
    }

    Normally, I would not recommend the definition of a height on a

    that contains text, BUT in this case there are many possibilities be accommodated the text should zoom to the end user in two or three times.

  • How we split the screen for different horizontal and vertical divisions

    Hello

    How we split the screen for different horizontal and vertical divisions. I can't use panelSplitter because I need fixed screen and not the division which is movable/sliding. I tried inlineframe, but which fails because you cannot use forms, other trees components... :(

    so I would like to know how to do division without panelSplitter.

    Thanks in advance,
    Jyothi

    Hi Jyothi,

    If you set the panelSplitter attribute disabled to true, the delimiter becomes permanent/mobile no.

    
    

    Kind regards
    Amélie Chan

  • How to display the scroll bar horizontally and vertically with arrows

    Hello

    I have a few lines and some columns in my application. Number of columns and lines is more. To view the next column or on the next row, we need to nevigate in the respective direction (left, right, up, down). I managed to do it.

    BUT, now, I want to show with the ARROWS scroll bars. and I am not able to show them.

    Need help.

    Thanks in advance.

    Hey guys got a solution for the arrows of the horizontal scroll bar

    HorizontalFieldManager hfmScrollbar;
            hfmScrollbar=new HorizontalFieldManager(){
    
                protected void sublayout(int maxwidth,int MaxHeight){
                    setExtent(FIELD_WIDTH,20);
                }
                public void paint(Graphics g){
                    g.setColor(Color.BLACK);
                    g.drawRect(0,0,FIELD_WIDTH,20);
    
                    int lxPts[] = {5, 15, 15};
                    int lyPts[] = {10,5,15};
                    int rxPts[] = {FIELD_WIDTH-5,FIELD_WIDTH-15,FIELD_WIDTH-15};
                    int ryPts[] = {10,5,15};
                    g.drawFilledPath(lxPts, lyPts, null, null);
                    g.drawFilledPath(rxPts, ryPts, null, null);
    
                    super.paint(g);
                }
            };
    

    display vertical scroll bar code as soon as I came to it

  • Horizontal and Vertical Layout / jump up

    Hello!

    I created a Folio with a horizontal and a vertical layout. If you scroll a section to the bottom of the page and then turn the Tablet, you will be at the bottom of the page in the page layout option too. What is good in most cases. But y at - it a possiblity to automatically jump to the top of the page while turnin the Tablet?

    Thank you very much!

    N °

Maybe you are looking for