trichview.support
Re: Example code for tabs? |
Author |
Message |
Sergey Tkachenko |
Posted: 10/16/2004 19:57:22 I created the document from this screenshot using the ActionTest demo. Tabs can be added the ruler (it may be used even without RichViewActions) or in RichViewActions' paragraph dialog. Here is how to create the document from code. The first part of this code adds a new paragraph style and assign its properties. You can do this work at designtime in the ObjectInspector. var ParaNo: Integer; begin RichViewEdit1.Clear; RichViewEdit1.DeleteUnusedStyles(True,True,True); with RichViewEdit1.Style.ParaStyles.Add do begin Options := [rvpaoNoWrap]; with Tabs.Add do begin Align := rvtaRight; Leader := '.'; Position := 400; end; end; ParaNo := RichViewEdit1.Style.ParaStyles.Count-1; RichViewEdit1.AddNL('Prices Demo', 0,0); RichViewEdit1.AddTextNL( 'Mastering Delphi 7'#9'$39.59'#13+ 'Tomes of Delphi: WIn32 Shell API Windows 2000 Edition'#9'$40.77'#13+ 'The Road to Delphi: Scenes from the History of Oracles'#9'$39.59', 0, ParaNo, ParaNo); RichViewEdit1.Format; end; > I want to create a price list, with right-aligned prices and dotted leaders. > This page: > http://www.trichview.com/shots/tabs.gif is about right. Is there example > code? > Should I use tabulators or RVActions? > Since the position of the prices will be fixed, I don't need to display a > ruler. > > Thanks in advance. > Chris > > |
Powered by ABC Amber Outlook Express Converter