Article ID: 196876
Article Last Modified on 6/14/2006
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 event)
{
DhElement el = this.findElement("coloredText");
try
{
this.newLine();
this.addText("ForeColor:"+el.getForeColor().toString());
}
catch(Exception e1)
{
this.newLine();
this.addText(e.toString());
}
try
{
el.setForeColor(Color.BLUE);
this.newLine();
this.addText("ForeColor:"+el.getForeColor().toString());
}
catch(Exception e2)
{
this.newLine();
this.addText(e.toString());
}
}
}
<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 -->
<FONT color=BLUE>
<SPAN id="coloredText">Testing...</SPAN>
</FONT>
</BODY>
</HTML>
Testing... ForeColor:com.ms.wfc.ui.Color [0, 0, 0] ForeColor:com.ms.wfc.ui.Color [0, 0, 255]
Keywords: kbbug kbinetdev kbpending kbwfc KB196876