trichview.support
Re: Building custom header |
Author |
Message |
Sergey Tkachenko |
Posted: 07/12/2003 18:23:12 Since tab stops are not supported yet, you have two options for aligning text in columns: 1) using tables // assuming that RVStyle.TextStyle[0] is plain text, // RVStyle.TextStyle[1] is bold text table := TRVTableItemInfo.CreateEx(4. 2, rve.RVData); for r := 0 to table.Rows.Count-1 do for c := 0 to table.Rows[r].Count-1 do table.Cells[r,c].Clear; table.Cells[0,0].AddNL('From:', 1, 0); table.Cells[1,0].AddNL('To:', 1, 0); table.Cells[2,0].AddNL('Sent:', 1, 0); table.Cells[3,0].AddNL('Subject:', 1, 0); table.Cells[0,1].AddNL(..., 0, 0); table.Cells[1,1].AddNL(..., 0, 0); table.Cells[2,1].AddNL(..., 0, 0); table.Cells[3,1].AddNL(..., 0, 0); rve.AddItem('', table); 2) using font with fixed width (for example, 'Courier New'); in this case, you can add a proper number of spaces to align text. // assuming that RVStyle.TextStyle[0] is plain text, // RVStyle.TextStyle[1] is bold text of 'Courier New' rve.AddNL('From: ', 1, 0); rve.AddNL(..., 0, -1); rve.AddNL('To: ', 1, 0); rve.AddNL(..., 0, -1); rve.AddNL('Sent: ', 1, 0); rve.AddNL(..., 0, -1); rve.AddNL('Subject: ', 1, 0); rve.AddNL(..., 0, -1); > I'm trying to build a header with custom contents, can you give me some > pointers on how to add contents with different formats on the same line. I'd > like to have a header that looks like this, I've included the formatting > options in brackets. I'd also like to have the contents in 2 columns with > labels in one and contents in the other. I've searched the demo's & help > file but could not find an example of how to do this. > > (Bold)Name > (Insert a > line) ---------------------------------------------------------------------- > ---------- > (Bold)From: (Normal) Name1;Name2;Name3.... > NameX.. > (Bold)To: (Normal) Name1;Name2;Name3.... > NameX.. > (Bold)Sent: (Normal)Thursday, 10 July... > (Bold)Subject: (Normal)Subject... > (Insert a > ---------------------------------------------------------------------- > -------- > > Thanks, > > Etienne. > > > |
Powered by ABC Amber Outlook Express Converter