on 2005 Nov 22 8:32 AM
Hi,
How can I change LayoutData of a UI element that I created dynamically and his parent is in MatrixLayout?
I want to change his CellBackgroundDesign. (dynamically...)
Thanks,
Noy
Noy,
Sadly, there is no binding possible, so you have to do this programmatically. Here is the sequence:
1. You must locate element somehow, probably passing it's id to corresponding action handler, or via storing id in context node element attribute.
2. You must set some flag (attribute in context) from action handler, that describes element to be modified. You may use null for "no modifications" and element id as flag for processing.
3. Do the following in wdDoModifyView:
/* flag value */
final String id = wdContext
.currentContextElement().getModifiedElementId();
if ( null == id ) return;
final IWDUIElement el = (IWDUIElement)view.getElement(id);
final IWDMatrixData cell = (IWDMatrixData)el.getLayoutData();
cell.setCellBackgroundDesign(<some costant>);
Valery Silaev
EPAM Systems
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
64 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.