Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6741563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:44:22+00:00 2026-05-26T11:44:22+00:00

I am facing issue while displaying multiple columns in a row. I need multiple

  • 0

I am facing issue while displaying multiple columns in a row. I need multiple columns and multiple row list field. Now I am trying to make this using label field i one of my case its working quite good but in another case I am facing an issue please help me out. My code is:

VerticalFieldManager TOrderVFM = new VerticalFieldManager()

for ( int i = 0; i <10; i++)
{
    HorizontalFieldManager temphfm1 = new HorizontalFieldManager(){

        protected void sublayout(int width, int height)
        {

            int w = 480;
            int h = 400;

            super.sublayout(w, h);
            super.setExtent(w, h);
        }
    };

    TOrderVFM.add(temphfm1);

    temphfm1.add(createDayName1(MTradeOrderSoap.objects[i].getProperty("orderDate").toString()));
    temphfm1.add(createDayName1(MTradeOrderSoap.objects[i].getProperty("id").toString()));
    temphfm1.add(.createDayName1(MTradeOrderSoap.objects[i].getProperty("label").toString()));
    temphfm1.add(createDayName1(MTradeOrderSoap.objects[i].getProperty("quantityPending").toString()));
    temphfm1.add(createDayName1(MTradeOrderSoap.objects[i].getProperty("securityName").toString()));
    temphfm1.add(createDayName1(MTradeOrderSoap.objects[i].getProperty("priceType").toString()));
    temphfm1.add(createDayName1(MTradeOrderSoap.objects[i].getProperty("orderOrigin").toString()));

    temphfm1.add(ut.createDayName1(MTradeOrderSoap.objects[i].getProperty("orderStatus").toString()));

}   

This loop is inserting values that are coming from the soap response and passing it to the method named createDayName() which is also given below.Now this all works good for my one of the screens but when i try to follow this for my another screen i am facing an error:-WARNING: Cannot layout field, insufficient height or width

I have set the width and height of both the managers but nothing seems to be working .Please provide me a support to do that.

public LabelField createDayName1(final String day)
 {
    LabelField cell = new LabelField("", Field.NON_FOCUSABLE) {
        protected void layout(int width, int height)
        {
            int w = Display.getWidth()/7;
            int h = 40;
            super.layout(w, h);
            super.setExtent(w, h);
        }

        protected void paint(Graphics g)
        {
            g.setColor(0xFF9912);
            g.setFont(dayNameFont);
            g.fillRect(0, 0, getWidth(), getHeight());
            g.setColor(Color.BLACK);
            // g.setColor(0x466385);
            g.drawText(day.trim(), getWidth() / 2 - dayNameFont.getAdvance(day) / 3, getHeight() / 3 - dayNameFont.getHeight() / 2);
            super.paint(g);
        }

    };
    return cell;
}                                              
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:44:23+00:00Added an answer on May 26, 2026 at 11:44 am

    In layout() and sublayout() you need to make sure you’re comparing the width and height you are passing to setExtent() (and super.layout()/super.sublayout() for that matter) to the arguments getting sent to those methods because they are the maximum available width and height. If you try to tell the Field to be wider or taller (using setExtent()) than what is available, it won’t be able to display properly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing a class resolution issue while trying to make my architecture flexible.
More precisely, I am facing this issue while trying to install https://github.com/barraponto/thacker-profile (commit 75c693581796eddae5fc39870dfcc2647e00c81b
I am using Appweb server (mini http server) and facing an issue while opening
I am facing an issue while trying to use the spring android framework. I
I am facing an issue while trying to install the requirements for my django
I am facing an issue while trying to reload rules dynamically. Starting with the
I am facing a strange issue while using javascript setTimeout function in IE8. I
I am facing some issues while serializing objects (I am using JBoss Drools, and
i am doing a database design using EAV. I am facing an issue when
I am using ASP.NET MVC2 with NHibernate, but am facing an issue. All calls

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.