Unregistered
December 22, 2002, 19:01:12
I'm trying to restrict displaying TableFormatDialog() to when a table or its cells are actually selected as shown below:
private void mnuTablePopUp (object sender, System.EventArgs e)
{
TXTextControl.Table TableAtInputPosition = textControl1.Tables.GetItem();
mnuFormatTableItem.Enabled = (TableAtInputPosition != null);
}
The problem is that Table.GetItem() returns a Table only if a SINGLE cell is selected. More than that, and the result is null.
The VM.NET TXControlWords sample application has the same erroneous behaviour.
This message was originally posted by Mark Smith in the old TX Text Control Support Forum.
private void mnuTablePopUp (object sender, System.EventArgs e)
{
TXTextControl.Table TableAtInputPosition = textControl1.Tables.GetItem();
mnuFormatTableItem.Enabled = (TableAtInputPosition != null);
}
The problem is that Table.GetItem() returns a Table only if a SINGLE cell is selected. More than that, and the result is null.
The VM.NET TXControlWords sample application has the same erroneous behaviour.
This message was originally posted by Mark Smith in the old TX Text Control Support Forum.