Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Form Field Width Sizing

    I am looking for a way to reduce the size of a UI control (SpiinerItem) on a DynamicForm. The goal is to reduce it down to a 50 pixels width.

    Configuration:

    SmartClient Version: v8.3p_2012-11-26/PowerEdition Deployment (built 2012-11-26)
    Internet Explorer 8

    Code:
    mPageForm = new DynamicForm();
    mPageForm.setID("PageForm");
    mPageForm.setNumCols(2);
    mPageForm.setAlign(Alignment.LEFT);
    mPageForm.setWidth(100);
    mPageForm.setFixedColWidths(true);
    mPageForm.setColWidths(50, 50);
    
    mPageSize = new SpinnerItem("page_size", "Page Size");
    mPageSize.setMin(1);
    mPageSize.setMax(100);
    mPageSize.setStep(5);
    mPageSize.setValue(25);
    mPageSize.setWrapTitle(false);
    
    mPageForm.setFields(mPageSize);
    addMember(mPageForm);
    I have read the FormLayout discussion and attempted to experiment with column widths in the form. Unfortunately, they do not appear to impact the field widths. The FormField image shows the presentation and the DevConsole shows the dimensions of the form.

    I am sure I am missing something here - do you have some advice?

    Thank you.
    Attached Files

    #2
    You just need to call setWidth() on the SpinnerItem. It has a default of 150, setting it to "*" would cause it to fill the column.

    Comment

    Working...
    X