| View previous topic :: View next topic |
| Author |
Message |
PatrickUlmer Guest
|
Posted: Mon Oct 13, 2003 1:43 am Post subject: set CellBorder in TextTable over OLE |
|
|
Hi,
I have create a TextTable and can set the TableBoder without a problem. Now I want to set the cellborder TopBorder from the CellProperties, but how can I get access to CellProperties?
I only get XCell und XCellRange over getCellRangeByPosition getCellByName. I use OLE with Delphi.
Isn't it possible?
Thanks...Patrick |
|
| Back to top |
|
 |
jowege General User

Joined: 21 Aug 2003 Posts: 10
|
Posted: Mon Oct 13, 2003 4:40 am Post subject: |
|
|
Hi Patrick,
a liddle procedure to visible or unvisible a TextTableBorder:
| Code: |
procedure TOfficeFunc.SetTextTableBorder(iTableName:String;iVisible:Boolean);
var oTableBorder, oHelpLine, oTable:Variant;
begin
oTable:= oObj[oAktO].oDoc.TextTables.GetByName(iTableName);
oTableBorder := oTable.TableBorder;
oHelpLine := oTableBorder.BottomLine;
if iVisible then begin
oHelpLine.InnerLineWidth := 1;
oHelpLine.OuterLineWidth := 1;
end else begin
oHelpLine.InnerLineWidth := 0;
oHelpLine.OuterLineWidth := 0;
end;
oTableBorder.TopLine:= oHelpLine;
oTableBorder.BottomLine:= oHelpLine;
oTableBorder.LeftLine:= oHelpLine;
oTableBorder.RightLine:= oHelpLine;
oTableBorder.HorizontalLine:= oHelpLine;
oTableBorder.VerticalLine:= oHelpLine;
oTable.TableBorder:= oTableBorder;
end;
|
I hope it will help you to solve your problem.
jowege |
|
| Back to top |
|
 |
PatrickUlmer Guest
|
Posted: Mon Oct 13, 2003 4:51 am Post subject: set cellborder |
|
|
Hi,
sorry, I need to set borders of single cells to get a good looking invoice.
Patrick |
|
| Back to top |
|
 |
PatrickUlmer Guest
|
Posted: Thu Oct 16, 2003 1:03 am Post subject: set cellborder - SOLVED |
|
|
Hi,
my problem is solved.
| Code: |
_cellrange := _table.getCellRangeByPosition (1, 1, 1, 1);
_borderline := _cellrange.BottomBorder;
_borderline.InnerLineWidth := 0;
_borderline.OuterLineWidth := 1 * PT2MM * 100;
_borderline.LineDistance := 1 * PT2MM * 100;
_cellrange.BottomBorder := _borderline;
_cellrange.BottomBorderDistance := 50;
|
Thanks...Patrick |
|
| Back to top |
|
 |
|