on 05-23-2005 9:59 AM
Hi,
The way we can create UI elements programmatically, can we create layout for a group or for a container in the same way? APIs like IWdGridLayout are available but it does not allow to create instance of it(it gives runtime exception). Also, I can specify the layout but can not alter its properties like colCount, colSpan etc.
Please help.
-Tejal
Hi,
Just check this code snippet.
IWDTransparentContainer finContainer = (IWDTransparentContainer)thisView.createElement(IWDTransparentContainer.class,"FinContainer"+idIndex);
IWDGridLayout layout =(IWDGridLayout)finContainer.createLayout(IWDGridLayout.class);
layout.setColCount(4);
IWDGridData finLoanGrid = (IWDGridData)finLoanTxt.createLayoutData(IWDGridData.class);
finLoanGrid.setColSpan(4);
Hope this solves ur problem.
Regards,
Sowjanya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do it like this:
// get container by ID
IWDUIElementContainer container = (IWDUIElementContainer) view.getElement("containerID");
// create and set new layout
IWDMatrixLayout layout = container.createLayout(IWDMatrixLayout.class);
// set layout properties
layout.setStrechedHorizontally(false);
// ...
For the children of this container, create layout data of type IWDMatrixData or IWDMatrixHeadData and set properties accordingly.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.