Ok, so I am adding a bunch of different dojo components to a table
<table>
<tr><td> DOJO COMPONENT 1 </td></tr>
<tr><td> DOJO COMPONENT 2 </td></tr>
<tr><td> DOJO COMPONENT 3 </td></tr>
</table>
All components are input components like text box, text area, date box, checkbox
But it comes out wierd like this:
Name:[ ]
Address:[ ]
Date of Birth:[ ]
I want the input fields to be aligned so it looks something like this, I want the input field to adjust.
Name: [ ]
Address: [ ]
Date of Birth: [ ]
I do not want to set the label width of each dojo component to a certain value (like 400 px), although it is a solution.
Below is the properties i set for each component:
dijit.byId("${attr.id}").set({
label: "${attr.name}",
labelAlignment: "horizontal",
fieldWidth : 400
});
Ideas would be appreciated
You might want to check the dojox.layout.TableContainer widget, it does exactly what you are looking for 🙂