Hi,
I am trying to align the text in 1 colum in my table to the right ( the last column in a row of 3 colums )
All I have found so far is the TFontInfo::VAlign property and unfortunately no such thing as a TFontInfo::HAlign property :).
the table cell also only has a VAlign property TRVTableCellData::VAlign. I know you can create a right aligned Paragraph but how do you set such a style to a table cell?
[code]
styles_m->TextStyles->Add();
int leftstylenum = styles_m->TextStyles->Count-1;
styles_m->TextStyles->Items[leftstylenum]->Assign(LeftInfo);
styles_m->TextStyles->Items[leftstylenum]->Standard = false;
delete LeftInfo;
TFontInfo * RightInfo = new TFontInfo(NULL);
RightInfo->Color=(TColor)0;
RightInfo->FontName="Verdana";
RightInfo->Size=10;
styles_m->TextStyles->Add();
int rightstylenum = styles_m->TextStyles->Count-1;
styles_m->TextStyles->Items[rightstylenum]->Assign(RightInfo);
styles_m->TextStyles->Items[rightstylenum]->Standard = false;
delete RightInfo;
testtabledata_m = new TRVTableItemInfo(1,3,RichView1->RVData);
testtabledata_m->BorderWidth = 0;
testtabledata_m->CellBorderWidth = 0;
testtabledata_m->CellPadding = 2;
testtabledata_m->CellVSpacing = 0;
testtabledata_m->CellHSpacing = 0;
testtabledata_m->BorderVSpacing = 0;
testtabledata_m->BorderHSpacing = 0;
testtabledata_m->Cells[0][0]->BestWidth = 60;
testtabledata_m->Cells[0][1]->BestWidth = 100;
testtabledata_m->Cells[0][0]->Clear();
testtabledata_m->Cells[0][0]->AddNL("col1",leftstylenum,0);
testtabledata_m->Cells[0][1]->Clear();
testtabledata_m->Cells[0][1]->AddNL("col2:",leftstylenum,0);
testtabledata_m->Cells[0][2]->Clear();
testtabledata_m->Cells[0][2]->AddNL("align right !!",rightstylenum,0);
RichView1->AddItem("testtable ",testtabledata_m);
[/code]
Table cell align text right
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I already searched the Help and the demo applications for a possibilty to set the paragraph style of the cell but the only method I found was GetItemPara() in the help file and this function only returns the current paragraph style id.
I cannot find a method or a piece of example code to set the paragraph style to a cell
I cannot find a method or a piece of example code to set the paragraph style to a cell
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: