Article ID: 197568
Article Last Modified on 8/25/2005
table = (DhTable)findElement("table");
import com.ms.wfc.html.*;
import com.ms.wfc.core.*;
import com.ms.wfc.ui.*;
public class Class1 extends DhDocument
{
public Class1()
{
initForm();
}
private void initForm()
{
}
protected void onDocumentLoad(Object sender, Event e)
{
DhTable t;
t = new DhTable();
t.setBindID("table");
this.setBoundElements(new DhElement[] { t });
// Workaround: comment out the above 3 lines and uncomment the
// following:
// t = (DhTable)findElement("table");
// t.setBackColor(Color.RED);
DhCell cell=(DhCell)findElement("cell");
addText("Contents of DhCell is '"+cell.getText()+"'");
}
}
<HTML>
<BODY>
<hr>
<OBJECT classid="java:com.ms.wfc.html.DhModule"
height=0 width=0 ... VIEWASTEXT>
<PARAM NAME=__CODECLASS VALUE=Class1>
<PARAM NAME=CABBASE VALUE=Project1.CAB>
</OBJECT>
<!-- Insert HTML here -->
<TABLE align=center border=1 cellPadding=1 cellSpacing=1 width=75%
id=table>
<TR><TD id=cell> *</TD><TD> </TD><TD> </TD></TR>
<TR><TD> </TD><TD> </TD><TD> </TD></TR>
</TABLE>
</BODY>
</HTML>
Keywords: kbinetdev kbjava kbprb KB197568