Forum Discussion

lars_andersson's avatar
lars_andersson
New Contributor
15 years ago

Controlling the layout of a tableWidget

Hi

I've created a custom component that uses a 'tableWidget'. What I can't figure out is how to control the layout, such as setting column widths and controlling the width and height of the table. I've tried to create an instance of LTable, get the TableModel and do it the way it's done in Swing, but that doesn't help. Can someone please explain how it's done in loadUI?

/ Lars

By the way, if someone has a description of the different widgets and constraints available laying out your component, that would be great.

1 Reply

  • Sorry about this, but currently there is no way to customize the table widget. We're planning on adding a lot more options in loadUI's future, but for now most of the widgets available are quite limited in terms of customization.

    As for other widgets and constraints, the constraints used are for Mig Layout and are described in detail on that site. Container nodes can be controlled using "layout", "column", and "row" constraints. All layout nodes also have regular "constraints". The difference between these are described on the Mig Layout site. For example:


    layout {
    box( layout: "layout constraints here", column: "column constraints here", row: "row constaints here", constraints: "regular constraints here" ) {
    property( ... constraints: "non-containers only have regular constraints" )
    }
    }


    Unfortunately we do not have a list of all the currently available widgets.

    Regards,
    Dain
    eviware.com