Customize EditField increasing line height

Hello

I need to customize the EditField. Primarily, the visible lines should increase instead of a single row in the first place and further increase the runtime if more text is added. OR has a vertical scroll. Whatever I do, the EditField displays only the first line, increases only after that text will in the 2nd line.

I searched everywhere on the net and these forums to get some clues, but nothing works for me.

Help, please!

Thank you!

Note: The API Version that I need to use is of 4.6

Try USE_ALL_HEIGHT bit of style to your new call EditField (...).  Make sure that you limit the size of this area manager.

Also, take a look at this article:

TextBoxField revisited

The code in the article can be more simple in versions 4.6 +.  You have all the possibilities of setBorder() there.  Feel free to experiment.  Don't forget to read the comment as well - he has other ideas.

Tags: BlackBerry Developers

Similar Questions

  • Increase in height of Editfield, according to the text of add

    Hi all

    Can someone give me any example of code that can increase the height of editfield after adding text above.

    Here's my editfield with fixed height and width when the content is therefore increase over this size, the editfield was not increased. It has same height and width as we describe first.

    So please give me suggestion how to increase the width and height when the editfield increase content.


    Code example: -.

    EditField txt_NoteArea = EditField(BasicEditField.FILTER_DEFAULT | nouveau Field.FIELD_VCENTER |) Field.FIELD_HCENTER) {}
    {} public void paint (Graphics g)
    g.Clear ();
    g.setColor (0 x 430000);
    g.drawRect (0,0,this.getWidth (), this.getHeight ());
    Super.Paint (g);
    }
                           
    public void layout (int width, int height) {}
    Super.Layout (300,100).
    setExtent (300,100).
    }
    };

    Note: In the code above I initialize textfield like width = 360 and height = 100 and come up with the perfect height and width.  But when I add text in him, he will not increase in height...

    So please give me any little piece of code or a sample that can solve my problem.

    Thank you

    TEJ

    Hi Tej,

    Here's the code for you

    class MyEditField extends EditField
    {
    public MyEditField (long style)
    {
    Super (style);
    setBorder (BorderFactory.createSimpleBorder (new XYEdges (1, 1, 1, 1)));
    }

    public int getPreferredHeight()
    {
    return Font.getDefault.getHeight () * 3; setting the height of the edit as 3 rows field
    }

    public void layout (int width, int height)
    {
    Super.Layout (width, height);
    If (getExtent () .height<>
    setExtent (width, getPreferredHeight());
    }
    }

  • [SOLVED] How can I increase the height of the tabs?

    I was using a theme that has increased the height of the tabs. Unfortunately, the theme was in conflict with the menu tab setting using the TabMixPlus extension. I'm stuck with the theme by default or others who do not increase the size of the tab. I tried a variety of codes in userChrome.css nothing helps. I am currently using the default theme with Firefox 20.0.1 (a Linux operating system).

    You should be able to do through this code in userChrome.css

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    
    #TabsToolbar { height: 35px !important; }

    Customization files (interface) userChrome.css and userContent.css (Web sites) are located in the chrome folder in the Firefox profile folder.

  • How to increase the height of the bar system progress?

    Hello

    I want just to increase the height of the progress bar for windows system and is not able to customize. It is having the ability to adjust the width and the height. For example, the height of the progress bar of system used in install labview is large compared to the control that is in the control labview palette.

    I want that the progress bar as in the illustration below

    Thank you & best regards

    Samuel J

    System engineer

    CAPTRONIC systems

    Bangalore

    You cannot change the height of the horizontal blade in the system palette. You can use one of the modern palette that Mike has suggested, or you can use ActiveX ProgressBar or ProgressBar .NET if you run Windows. If you want to search for the latter, the forum as there are has examples.

  • ADF Mobile - by increasing the height of the footer

    Hi all

    Is the fixed height of the footer in amx?

    I want to put a listview inside the footer with three rows, but I see only one line preview.

    How can I increase the height of the footer?

    Or y at - it another way to remove the contents at the bottom of my screen?

    Help, please.

    Kind regards

    Deepak

    You should be able to do this in a .css file with:

    . AMX-panelPage-footer {height: 200px ;}}

    Rich.

  • Tips for creating the responses with different line heights

    Some of my answers have 1 line, some have 2, some even 3 lines. Any recommendations on configuring my Quiz slide so that the boxes to resize automatically?

    Currently, I have two problems:

    (1) I need layout manually each slide where one or more of the answers takes more than 1 line. It takes some time.

    (2) I can't use "shuffle answers", because the response of the 3 line is sometimes it's original space, and sometimes it's a line a line of response high.

    Any advice?

    I try to avoid long sentences in MCQ, but if it is necessary to have several lines (you can also reduce the size of the police) and I want to shuffle is my workflow:

    • Select the legend of response with the greatest height
    • Jointly select the other legends of the response, and then in the context menu, choose Aligh, resize at same height
    • increase the height of the surrounding area (surrounds all the legends of the response, it is also possible in the Quiz slides model, too bad, there are no placeholders for the legends of the individual response it)
    • move the legend of substantive response as needed (always use shortcuts like DOWN SHIFT and CTRL-DOWN, DOWN not to disturb the alignment)
    • to reselect all the legends of the answer, right click menu, Align, distribute vertically (or use the icons in the toolbar alignment of course)

    It is a pity that you cannot apply these lifestyle changes to all MCQ don't slide, apply no button accordion format, without memory default style in the upper part of the legend of the response properties panel. This means that the process must be done manually, but at least you can mix.

    Lilybiri

  • Digital fixed but different line height value

    Hello world

    On my front, I have a table (column) 1 d of numerical values next to a table (column) 1 d of channels. I need them to the line upward. I think that the height of figures is not editable, but for strings, you can change it.

    Here's my problem, on different PCs, I found that the heights of digital line have different fixed values. On my development PC (LabVIEW 2011, 32-bit), the line height is 22 pixels. On all the other test PCs (also LabVIEW 2011, 32 bit) the line height is 20 pixels. I need the berries to align all PC, but it looks different.

    Does anyone have any suggestions on how I can fix this?

    The height of controls digital and indicators are based on the font used for this.  The strings have their height adjustable independendtly.

    On these different PC, are you using different operating systems?

    See this thread and a few others.

    What you need to do is set the font for the strings and numeric values to be a specific font which is present on all operating systems and do not use 'system' or 'application' font that is based on the current settings of the operating system

  • TableView DataTemplate curious behavior of line height

    I noticed a problem of calculation of the HEIGHT of the LINE of the rows of the Table in a TableView.

    as a first step, I put TemplateRowProperties (40, PIXEL_HEIGHT).

    tested with some lines and it worked.

    But if there are more lines height becomes higher as more lines are there.

    has then tried to replace PERCENTAGE_HEIGHT and the value 10, so I expected that each line should get 10% of the display height.

    but the behavior even if there are more lines.

    Finally I'm done with this workaround: (not perfect, but in my case there are between 2 and 50 ranks works)

    dataTemplate.useFixedHeight(true);
    
    // Define regions and row height
    for (int i = 0; i < ROW_COUNT; i++) {
       dataTemplate.setRowProperties(i, new TemplateRowProperties(
           Math.max(1, MathUtilities.round(50/ROW_COUNT)),
                TemplateRowProperties.PERCENTAGE_HEIGHT));
    }
    

    is this a known bug? or I did something wrong?

    tried to useFixedHeight the value false, but then the height was too small.

    It's a simple table with 3 columns. Column width properties work as expected.

    int[]columnWidthPercent = new int[]{10,25,65};
    for(int col = 0; col < COL_COUNT; col++) {
          dataTemplate.createRegion(new XYRect(col,0,1,1));
          dataTemplate.setPosition(col,0,14);
          dataTemplate.setColumnProperties(
            col,
            new TemplateColumnProperties(
              columnWidthPercent[col],
              TemplateColumnProperties.PERCENTAGE_WIDTH));
    }
    

    THX

    We have problems with our login server Thursday, which have been resolved.

    Thanks for the taping of the show.  Someone should look into it soon.

  • We can increase the height of listfield.

    Hi all

    I show some values and images on the screen. but I'm unable to show the entire image I think listfiled a height of defult I can increase the height of listfield.

    Thanks in advance.

    On your ListField. Something like that...

    ListFielf myList = new ListField();

    myList.setRowHeight (100);

  • Is it me? Does not increase the height of page...

    Good so I was looking and looking for a response.  I set my header and footer, but adding content in the body does not increase the height of the page.  My site will have length and content of page various.

    I continue to watch the tutorials where size adjusts and lowers the foot of page, but on my layout, left 500 when I add elements to the body, and the elements overlap the footer.  I know that I can fool the site by adding a hidden box that draws the page downwards. I know that I can go to the properties of the site to adjust the height individually, but I would like to take the sensitive element.  The site is assigned to the fluid properties by the way.  Can someone tell me what I'm missing?

    Make sure you place elements are has no upper element 'footer' (check box in the command strip). If you place items in the footer box, this attribute will be checked automatically and perhaps unwittingly. In this case, the element will not push the foot down.

  • problem of line height in the edition after the update!

    That's what it looked like before the update.

    ZEHSPfu.png

    This is how it looks now.

    hG6wWh7.png

    same value of line-height. but it happens that when I post when I discover it locally there is no problem.

    As I said earlier, if you replace the

    TS: "textShadow" with ts: "textStyle".

    in the file edge.5.0.0.min.js in the folder publish\web\edge_includes, things will work.

    -Vivekuma

  • How to increase the height of a text element.

    How to increase the height of an element of text field

    See what {message identifier: = 10399675}

  • CC Flash embedded fonts line height average bad

    Have a problem with the text Dynamics fields using fonts embedded in Flash CC. all is well in the IDE, but once it's test-> released the line height is far. If I switch to a font like Arial system there is no problem when published. Examples:

    Fonts embedded in IDE

    embedded-stage.png

    Police emedded test-> publish

    embedded-publish.png

    Test of system fonts-> publish

    arial-publish.png

    Yes, the cc pro flash forum.

    Addendum: Here is a link: http://forums.adobe.com/message/5425262#5425262#5425262

  • Conditionlly "BOLD" - increase the height of the columns

    Hi all

    use <? If: NVL_RESP_CAT_TEXT_TOTAL = 'Total '? > <? attribute@InContext:color;' Black'? > <? attribute@InContext:font-weight;' "BOLD" '? > <? end if? > Bold a column in a table.

    Above code is work, but also to increase height of columns in the table. I don't want to increase the height of the columns.

    Please suggest

    Thank you
    Bhavana

    Try to reduce the font size to 1 less original.

  • Line height / spacing problem

    http://www.saracenlanding.com/events.html

    How can I open the line height in the text of the table? I wrote to 1.5 em line height in the rule table, but for some reason, it does not. This is the first site I ever built in DW (CS3 I think) and I don't know that it is gross under the hood. I wrote the rules on this one just for this page.

    Thanks in advance,

    Joe

    This rule in your linked css stylesheet:

    #veg-content table tr td {}
    border: 1px solid #000;
    do-family: Verdana, Geneva, without serif.
    line-height: 1em;
    do-size: 90%;
    Padding: 0.36em 0.35em 0.35em 0.4em.
    height: 25px;
    }

    Will work around this rule in your stylesheet css embedded.

    #holder table {}
    do-size: 0.8em;
    line-height: 1.5em;
    make-weight: normal;
    background-color: #FFC;
    border: 1px solid #000;
    border-collapse: collapse;
    text-align: left;
    vertical-align: top;
    }

    You have two options - change the height of the 1.5em line:

    #veg-content table tr td {}
    border: 1px solid #000;
    do-family: Verdana, Geneva, without serif.
    line-height: 1.5em;
    do-size: 90%;
    Padding: 0.36em 0.35em 0.35em 0.4em.
    height: 25px;
    }

    or "move down", a little further using your built-in css style.

    #veg - content #holder table td {}
    do-size: 0.8em;
    line-height: 1.5em;
    make-weight: normal;
    background-color: #FFC;
    border: 1px solid #000;
    border-collapse: collapse;
    text-align: left;
    vertical-align: top;
    }

    Option 1 is better because I don't see any reason why you would wrap the table in two

Maybe you are looking for