Gets the color of the text.

syntaxSyntax:
DlxTable.GetCellTextBrush(row, column, style)

Parameters

Parameter Description
row Row index.
column Column index.
style A DlxBrushStyle object.

Return Value

If the operation ends correctly it returns true otherwise it returns false.

Example

  Copy codeCopy code
var prj = DlxApp.GetJob().GetProject("Example Sch");
if (!prj.IsValid())
  prj = DlxApp.GetJob().NewProject("Example Sch");
var doc = prj.GetDocument("Examples Sch", DlxApp.DOCTYPE_SCHEMATIC);
if (!doc.IsValid())
{
  doc = prj.NewDocument("Examples Sch", DlxApp.DOCTYPE_SCHEMATIC);
  doc.SetPageFormat("A4", false);
}
if (doc.IsValid() && doc.Activate())
{
  var page = doc.GetActivePage();
  if (page.IsValid())
  {
    var layer = page.GetLayerFromType(DlxApp.LAYERTYPE_DRAWING);
    if (layer.IsValid())
    {
      var table = layer.DrawTable(new DlxRect(50,40,160,90), 4, 3);
      table.SetText(1, 0, "Hello World\nHello World\n");

      var font = new DlxFontStyle();
      table.GetCellTextFont(1, 0, font);

      var bkgBrush = new DlxBrushStyle();
      table.GetCellBackgBrush(1, 0, bkgBrush);

      var penTop = new DlxPenStyle();
      table.GetCellEdgePen(1, 0, DlxApp.TABLECELLEDGE_TOP, penTop);

      var txtBrush = new DlxBrushStyle();
      table.GetCellTextBrush(1, 0, txtBrush);

      DlxApp.Printf("cell(1,0): Font %s", font.GetName());
      DlxApp.Printf("cell(1,0): Color %s", txtBrush.GetName());
      DlxApp.Printf("cell(1,0): Bakg %s", bkgBrush.GetName());
      DlxApp.Printf("cell(1,0): Pen %s", penTop.GetName());
    }
  }
}

See also