Skip to Content
author's profile photo Former Member
Former Member

Trouble in fixing the layout in a bizcard format (gridlayout)

Hello Experts,

I am using the below code. to display in data in bizcard.

in format

label1: text1

label2: text2

label3: text 3

but the data is showed up as

label1:

text1

label2

text2

label:

text3

can anyone suggest me the solution to correct this.

for (int k = 0; k < fieldInfo.length; k++)

{

IWDLabel labelView = (IWDLabel) view.createElement(IWDLabel.class, "labelView" + iBizCardLocation + k);

labelView.setText(fieldInfo[k].label);

IWDGridData labelGridData = (IWDGridData) labelView.createLayoutData(IWDGridData.class);

labelGridData.setWidth("100px");

labelView.setWidth("35%");

IWDTextView textView = (IWDTextView) view.createElement(IWDTextView.class, "textView" + iBizCardLocation + k);

textView.setText(elementRecord.getAttributeValue(fieldInfo[k].fieldname).toString());

groupBizCard.addChild(labelView);

groupBizCard.addChild(textView);

}

Thanks,

James

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2008 at 07:30 AM
    IWDGridLayout grid = (IWDGridLayout) groupBizCard.getLayout();
    grid.setColCount(2);
    for (...)
    

    This assumes that you already have assigned a GridLayout to the container "groupBizCard". Otherwise use

    IWDGridLayout grid = (IWDGridLayout) groupBizCard.createLayout(IWDGridLayout.class);
    ...
    

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2008 at 03:44 AM

    Hi James,

    use method setColCount() and input as 2 or use setColSpan() and input as 2.

    Edited by: Aishwarya Sharma on Oct 11, 2008 6:10 AM

    Edited by: Aishwarya Sharma on Oct 11, 2008 10:17 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2008 at 03:56 AM

    hi!

    you can set RootUIElementContainer property colCount as 2 .

    Thanks!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.