FIX: DhCell.resetTextAlign() Does Not Update Cell DisplayID: Q197567
|
DhCell.resetTextAlign(), which sets the cell text alignment property back to match the alignment property of the row the cell is in, does not work.
To work around this issue, set the text-align style in your Cascading Style Sheet (CSS) to an empty string. For example, for a DhCell called "cell," you would do the following:
cell.setCSSStyle("text-align", "");
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
This bug was corrected in Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:
Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why
Q194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
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 table=new DhTable();
add(table);
DhRow row=new DhRow();
table.add(row);
DhCell cell=new DhCell("Testing");
row.add(cell);
cell.setWidthUnit(200,DhUnits.PIXEL);
cell.setBackColor(Color.LIGHTGRAY);
cell.setTextAlign(DhAlignment.RIGHT);
cell.resetTextAlign();
// Workaround: Uncomment the next line and comment
// out the line above for the workaround.
// cell.setCSSStyle("text-align", "");
}
}
<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 -->
</BODY>
</HTML>
For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java,
please see the following pages on the Microsoft Technical Support site:
http://support.microsoft.com/support/visualj/
http://support.microsoft.com/support/java/
© Microsoft Corporation 1998, All Rights Reserved.
Contributions by Derek Jamison, Microsoft Corporation
Additional query words:
Keywords : kbservicepack kbhtml kbJava kbVJ600bug kbWFC kbVS600sp2 kbVS600SP1 kbVS600sp3fix
Version : WINDOWS:3.1,6.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: May 19, 1999