Lines dynamic height Blackberry

Hello. I work with RichTextField inside TableRowManager Blackberry. I've just stuck with something. I want to get variable height for each line, but I just got height for each line.

I've tried "setRowHeight (int arg0, int arg1)", but it gives an error because it is just valid for 'setRowHeight (int arg0).

Is there an alternative to use a method like setRowHeight undocumented?

Please give me help. Thank you

Here is my code:

public class ImageListField extends ListField implements ListFieldCallback {
    Vector rows;
    Vector satu;
    Vector dua;
    Vector tiga;
    Font font1;
    int totalHeight = 0;
    int fontHeight;
    TableRowManager row;

    public ImageListField(int indeks, Vector ayat) {
        rows = new Vector();
        satu = new Vector();
        dua = new Vector();
        tiga = new Vector();

        for(int i=0; i 
         
        

Two recommendations:

(1) stop to develop using this level of JDE.  Any device released with that OS level can and should have been upgraded to OS 5.0.  You will find much better to work with OS 5.0.

(2) stop using the JDE, develop using Eclipse.  You can import projects JDE.

Back to your question, from memory, that some people have reported success limited using lines of variable height by using the method that you found undocumented, but there have been more than people who noted that it makes the ListField react badly especially scrolling.  So if you really need lines of variable height, then I recommend you plan to create a line with a HorizontalFieldManager.

ListField is a great control to manage hundreds of rows of data, but that, to compromise, in this case with the line height.  If you have only a few rows to display, then you should get an adequate return with managers.

Tags: BlackBerry Developers

Similar Questions

  • External text of county line dynamic text field

    Hello friends,

    I've done a scroll bar, , but now I have a problem, need to read the number of lines dynamic text field and If it is greater than x show the scrollbar and hide if is less.

    Like this:

    if(Text.instance>7) {}

    ScrollBar._visible = true;

    }

    else {}

    ScrollBar._visible = false;

    }

    My problem is How do I count the total of lines of dynamic text field after load an external text.

    then either:

    1. what you see is not aplicationScroll or

    2. you have more than 1 scrollbar named aplicationScroll or

    3. you have the code runs also change the aplicationScroll to true _visible property.

    Use the movie Explorer to track down your error.

  • How to create a labelfield with fixed width and dynamic height?

    I got this question in fact for a long time and I have not found answer in this forum so far.

    As we know, we can use:

    public int getPreferredWidth()
    {
        return fixedSize;
    }
    
    protected void layout(int width,int height)
    {
        super.layout(getPreferredWidth(), getPreferredHeight());
        super.setExtent(getPreferredWidth(), getPreferredHeight());
    }
    

    to set the width fixed in a field, but if the text is too long and should be multiline, this will bring problem, getPreferredHeight() only returns the preferred height, which is actually not the actual height, so the text will be hashed.

    So what should this setting? height?

    super.setExtent(getPreferredWidth(), height));
    

    No.... the height value is too large.

    So, how can we set this parameter to make this labelfield looks perfectly.

    Any idea?

    A search on the web is expected to increase a lot of examples of functions in Java text wrapping. Especially for BlackBerry, you can use Font.getAdvance (String text, int start, int len) to measure the width of a text segment without the expense of creation of substrings.

    The basic logic is to analyze the text character by character. If the "\n" character, force a line break. If the character is a space, then it is a line break candidate; Check if the line so far is set. If so, then move the candidate to that character end and continue; If this is not the case, go back to the previous candidate break and put an end to the line right there. The loop is initialized so that there is always at least one character on the line. The process ends when you run out of text. Details (including dealing with empty text, several spaces, etc.) are kept as an exercise for the reader, or search the Web well.

    I wouldn't worry efficiency. Put on the page of the field is not all that often, and when it's done, there's no escape from the need to make the work of packaging line at some point before the text is rendered on the screen. One way to avoid unnecessarily repeating work is to memoize the function of packaging line: wrapped lines and the width of the film cache and reuse them as needed. The cache is marked invalid if changes to text or the current width and the width of the film cached differ.

  • Problem by drawing a line dynamically

    Hello. I want to draw a line between two points in a dynamic way, it's average, by clicking on a canvas the first time will give the origin of the line and clicking will give once again, the end of the line (segment/stroke). I'll appreciate any help with this issue. Thanks in advance.

    Hello

    pls find the solution of your problem with the code below and let me know if you have any problem.

    Main.MXML

    http://www.Adobe.com/2006/mxml '.

    "Layout ="vertical"verticalAlign ="middle"xmlns:local =" * ">

    DrawingCanvas

    http://www.Adobe.com/2006/mxml"backgroundColor ="0xFFffff ".

    Width = "400" height = "300".

    creationComplete = "onCreationComplete () '"

    "xmlns:local =" * ">

    private function onCreationComplete():void

    {

    this.addEventListener (MouseEvent.MOUSE_DOWN, onMouseDown);

    this.addEventListener (MouseEvent.MOUSE_MOVE, onMouseMove);

    this.addEventListener (MouseEvent.MOUSE_UP, onMouseUp);

    }

    private var isMouseDown: Boolean;

    private var counter: number = 0;

    private var myShape: Shape = new Shape();

    private var : Point of origin;

    private var : destination Point;

    private function onMouseDown(event: MouseEvent):void

    {

    isMouseDown = true;

    origin = new Point (event.localX, event.localY);

    }

    private function onMouseMove(event: MouseEvent):void

    {

    if (isMouseDown is true)

    {

    destination = new Point (event.localX, event.localY);

    var lineThickness:Number = 2;

    var lineColor:Number = 0 x 000000;

    var lineAlpha:Number = 1;

    myShape.graphics.clear ();

    myShape.graphics.lineStyle (lineThickness, lineColor, lineAlpha);

    myShape.graphics.moveTo (origin.x, origin.y);

    myShape.graphics.lineTo (destination.x, destination.y);

    }

    }

    private function onMouseUp(event: MouseEvent):void

    {

    this.rawChildren.addChild (myShape);

    isMouseDown = false;

    }

    ]]>

    with respect,

    Mayeul Singh Bartwal

  • Need to draw the line & bargraph on Blackberry using JDE 4.7

    Hello

    I need to draw a line and a graphic barcode using JDE 4.7.

    can someone help me find the starting point.

    Thanks in advance.

    The forum search will often provide an answer.

    http://supportforums.BlackBerry.com/T5/Java-development/how-implements-a-chart-on-BlackBerry/m-p/465...

  • Issue of line Signature of blackBerry Smartphones

    Hello everyone my name is Beth and I'm new to Blackberry.  Fortunately, I traded in my Treo for a ride!  A question I have... is there at - there a way to remove the "sent from my BlackBerry" line when sending of electronic mail to the phone?  Any help would be greatly appreciated.  Thank you

    Hello Beth... Welcome to the forums.  To remove this member from sentence of your emails, click on the menu button (on the left), then the installation folder, click e-mail settings.  Select the e-mail account that you want to change, and then click the trackball, then click on modify.  Scroll to the signature box and you can either change the signature is going to say, or remove it completely.  I am a newbie to BB as well... I've had my turn a little over a week now and love it so far.  I learn something new about this almost every day.  Good luck with yours as well!

  • How to make the field 'Description' biggest area? (3 to 4 lines in height compared to the present 1 line)

    I'm guessing that in CSS or HTML in the Editor of Landing Page I can do form field seems bigger than just the single line. Ideally, I would like to than the text about 3 to 4 rows height box.

    Please help me solve this problem! Means the simplest would be the best, but I'll take any answer at this stage.

    Thanks Topliners community!

    Figured out that you go to "Custom Fields" then hit paragraph box and replace the HTML name, as well as card in the stages of treatment, in the field "Description". PM me if you want more details and this has been a concern for you as well.

  • Extraction of the sizes of the police and of the line, the height is completely buggy.

    Hello

    I have been using projectparfait / (now active) for a long time and I must say it has changed my entire workflow on the front-end development. Be able to quickly find the font sizes and height of line is/has been for me one of the most valuable features. Now a little while, any font-size/line height with a scale factor applied to what is more annoying, they essentially make this tool useless for me, there are still features such as the instrument of measurement that are big but in the end, I have to open it with photoshop that I try to avoid as much as possible.

    It would be awesome if you guys could focus on this.

    Best regards Thomas

    Hello

    Sorry about that! I have submitted an internal question and we'll try and get it fixed quickly.

  • Integrating Wordpress in need of Muse dynamic height with cross domain content-based

    Given that Muse does currently not support articles and Wordpress integration I decided to use an iFrame.

    My goal is to have the height of the iframe dynamic change based on the content of my Wordpress blog. I understand that this is a common problem with frames that are hosted on different domains.

    I'm running by having more to compensate with a bunch of deadspace to leave enough room. You can also get the horrible scrolling to the search bar.

    I tried using cross-site scripting, JQuery, and postMessage but can't find out how to put the right code in Muse and Wordpress for them to communicate in either sense.

    Please, any help on this would be greatly appreciated.

    Apparently, you try to insert the iframe to another area and because of the "Same origin" security policy, you are not authorized to access the document property of the iframe object. This will not happen if the inserted iframe is on the same domain.

    Check it for more on this, http://javascript.info/tutorial/same-origin-security-policy

    - Abhishek Maurya

  • < netui-data: pager > action to extract lines dynamically

    Hello

    How can I configure a pager of DataGrid to dynamically extract lines when a user through the paging swap pages?
    I know that I can read all my lines to a collection / array before the rendering of the datagrid control and set the pager to iterate on it like this:

    [Controller]

    Private list < Ride > wrinkles;

    public list < Ride > getRides() {}
    return of the rides;
    }

    [Action]
    wrinkles = rideDBControl.getAllRides (); huge amount of data
    ...
    back to the front;
    }

    [JSP]

    "< div style =" "border-width: 2px;" > < netui-data: dataGrid name = "currentRidesGrid" dataSource = "pageFlow.rides" >
    < netui-data: configurePager pagerFormat = "prevNext" pageSize = "${pageSize}" / >
    < netui-data: header >
    < netui-data: headerCell headerText = "Name" / >
    < netui-data: headerCell headerText = "Description" / >
    < / netui-data: header >
    < netui-data lines: >
    < netui-data: spanCell value = "${container.item.name}" style = "background-color: #f0f0f0; do-size: 14pt; ">
    < / netui-data: spanCell >
    < netui-data: spanCell value = "${container.item.description}" >
    < / netui-data: spanCell >
    < / netui-data lines: >
    < / netui-data: dataGrid > < / div >

    But how can I make the pager call a method to update the content of the collection "wrinkles" according to the current selected page and the size of the page? And how do I get the current page and the size of the page inside this method?
    I want to be paginated queries that may return a huge amount of data (1 m + lines), so extract all lines at once is impossible. What I want to do, is spreading the current page and the page size of pager to a method that will update the current collection according to a query such as:

    Select X, Y, Z
    Table
    Where the...
    And ROWNUM BETWEEN page * pageSize AND (page + 1) * pageSize

    Can someone help a noob?

    For more information, I found the answer by myself.

    To retrieve the rows dynamically, you must change the tag , and include the attributes a pageAction and partialDataSet, for example:

    Within the action of pagination, you can get the current size of the line and page of a PagerModel object. You can then update the data source (don't forget to call the setDataSetSize providing the length of the entire data so that the pager shows the right amount of pages), for example:

    @Jpf.Action (forward = {@Jpf.Forward (name = "success", access = Jpf.NavigateTo.currentPage)})
    {public pagination() before
    DataGridStateFactory dataGridStateFactory = DataGridStateFactory
    .getInstance (getRequest ());
    Gets the pagerModel for the grid object
    PagerModel pagerModel = dataGridStateFactory.getDataGridState)
    "currentRidesGrid") .getPagerModel ();
    => Code to get the size of any data source<>
    pagerModel.setDataSetSize (dataSourceSize);
              
    Get the first line and the model page size
    int firstRow = pagerModel.getRow ();
    int pageSize = pagerModel.getPageSize ();
              
    => Code to extract the rows to display<>
    wrinkles = pageRides;
              
    Forward, forward = new Forward ("success");
    back to the front;
    }

    I hope this helps.

    See you soon

  • That is to say &amp; amp; line FF height question

    Goodmorning, I've got a problem of line height css. I want to text on my pages to work on lines that are about 25 pixels apart and shown as a background image. Problem is that the lineheight I give CSS gets interperted differently in different browsers. Is there a solution for this?

    Thanks in advance

    Danny

    I'm afraid that you are trying to nail jelly to the wall. What will happen
    your alignment treated when someone resizes the text in the browser?

    --
    Murray - ICQ 71997575
    Adobe Community Expert
    (If you * MUST * write me, don't don't LAUGH when you do!)
    ==================
    http://www.dreamweavermx-templates.com - template Triage!
    http://www.projectseven.com/go - DW FAQs, tutorials & resources
    http://www.dwfaq.com - DW FAQs, tutorials & resources
    http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
    ==================

    "Daluiso" wrote in message
    News:ep4ulj$Hg6$1@forums. Macromedia.com...
    > Sorry Murray, here is the link:
    >
    > http://www.sitewash.nl/ida/ida.html

  • Prevent the break/packing line dynamically

    Can someone tell me how can I prevent a series of letter from breaking across a line break. For example, if I have a dynamic reports, which displays a snippit of the history of the press and then a "|" more information | "the link. Sometimes the "|" can be left above or below a line, because it was the end of the sentence. Here is an example:

    Text, text, text, text, text, text, text, text, all the text,
    Text, text, text, text, text, text, text, text, all the text,
    Text, text, text, text, text, text, text text text | more
    information |

    Of course, the new text is placed here dynamically, and I do not have full control where is the line break. How can I keep the "|" more information | "together?"

    Thank you very much
    Stephen
    Tallahassee, FL

    Two great answers. Thank you very much.

    Stephen

  • How to disable and enable fields already existing lines dynamically in the update page?

    Hi all

    I have a requirement where in detail RN (updated), I don't want the user to update the already existing line.

    In the area of retail, I have two columns, 1)-> existing supply must be read-only.

    -> Enabled 2) must be editable.

    For a newly added line (after clicking on add a line), offer both enabled column must be editable.

    For this model, I did table detail with text entry fields and set read only property: ${oa.offervo1.isOfferdis}-> offerDis is a transient (boolean) added in OfferVO.

    I should be able to field offers to read only to existing data.

    How can I set isOfferdis as true (aside from CO or AMimpl)

    and

    How do I set iaOfferdis as fake when add line button (I add line set up features)

    Thank you and best regards,

    Gauthier

    Hi AJ,.

    A surprise, I was able to reach the requirement,

    The code in RowImpl remains even as you suggested.

    However the default value of the transitional isOfferDis attribute as false (in VO).

    Then it works.

    I don't know why our code in AmImpl could not achieve this goal.  If you have any solution please share will try...

    Thank you and best regards,

    Gauthier

  • createTextfield with dynamic height?

    Is it possible to use createTextfield with a fixed width, but without setting the height so that it is size according to the amount of text loaded from XML? I would do this so I can get the _height property during execution to use for custom scrolling of the text field. Thank you in advance!

    You should be able to control the height without the need to pass a variable by using the following properties in the onLoad handler:

  • Back lines dynamically based on a column value

    Hello

    I have a folder in which that column is a number indicating the number of records that I must return. For example:

    I have a folder that looks like this:
    ID... NUMBER
    1... 3
    2... 1

    I need to return the data in this way:

    ID... NUMBER
    1... 1
    1... 2
    1... 3
    2... 1

    Is it possible to dynamically?

    I use a 10g version.

    Thank you

    Something like this:

    with my_tab as (select 1 id, 3 num from dual union all
                    select 2 id, 1 num from dual union all
                    select 3 id, 6 num from dual), -- end of mimicking your data in a table called "my_tab"
          dummy as (select level lvl
                    from   dual
                    connect by level <= (select max(num) from my_tab))
    select mt.id,
           d.lvl num
    from   my_tab mt,
           dummy d
    where  d.lvl <= mt.num
    order by mt.id, d.lvl;
    
            ID        NUM
    ---------- ----------
             1          1
             1          2
             1          3
             2          1
             3          1
             3          2
             3          3
             3          4
             3          5
             3          6
    

Maybe you are looking for

  • Equium L350D - 11 d - I should update the BIOS?

    A month ago I bought a "reworked factory" L350D - 11 d and I am pleased with it. I couldn't have guessed that it was not new, and it works perfectly, I would say. I just got a Toshiba Tempro application to download and install an update of the BIOS -

  • Re: Bluetooth hardware not detected on Satellite M40-145

    Hello I recently changed the HD of my Satellite M40-145. I have successfully used the recovery CD, office etc, and now everything seems to work fine... All except the Bluetooth, it is not detected (this laptop has a Bluetooth chip internal). It does

  • HARD drive is not recognized in the installation of Windows 7 settings

    Hello I'm trying to install Windows 7 Home premium to my Toshiba Tecra S3 model PTS30E 00Z036DU but when I install Windows 7 after a while he asked me about the witch device to install one must choose a hard drive, but the field is empty then I choos

  • OR impossible to run MAX

    Hello I installed LabView 2015 and when I try to open NI MAX, I get an error "NI MAX cannot start because the required library mxrmcfg.dll could not load" as the attached picture. I completely uninstalled LabView and re-installed, but I got the same

  • My slimline s3500 recognizes a pcie x 16 (gen2.1) map

    I have a hp pavilion slimline computer of Office I want to upgrade. I'll be out the motherboard and use it in another larger case that I have that supports micro atx and mini itx, there is so much room for the new gpu and I will also get a new power