| |
ActiveReports 2.0 (Visual Basic 6.0) Support
Started by Blue Streak at 06-18-2009 9:22 AM. Topic has 2 replies.
 
 
 
|
|
Sort Posts:
|
|
|
|
06-18-2009, 9:22 AM
|
Blue Streak
Joined on 06-18-2009
Posts 2
|
AR2 RichEdit Control, Vertical Alignment
|
|
|
|
|
I am posting this message on behalf of another programmer. This programmer is trying to generate a report utilizing AR2. In this report he has several RichEdit controls where he wants to be able to vertically center the text in the box. I have tried to help him by researching this topic but to no avail.
I know that this object doesn’t have a VerticalAlignment property of its own so this approach has to be done manually by writing our own function. However, I am personally not very familiar with AR2 myself. Does anyone have any suggestions?
TIA...
|
|
|
|
|
Report
|
|
|
|
06-18-2009, 11:03 PM
|
PrantikS
Joined on 12-11-2008
Posts 767

|
|
|
Hello,
In order to vertically align the text of the RichTextBox, you may add the following lines of code.
Private Sub Detail_Format () Me.RichEdit1.Width = Me.PrintWidth Me.RichEdit1.SelAlignment = rtfCenter If Me.Detail.Height < Me.RichEdit1.Height Then Me.Detail.Height = Me.RichEdit1.Height End If End Sub
Private Sub Detail_BeforePrint () Me.RichEdit1.Top = (Me.Detail.Height - Me.RichEdit1.Height) / 2 End Sub
Please take a look at the attached sample in this regard.
Regards, Prantik
|
|
|
|
|
Report
|
|
|
|
06-23-2009, 8:50 AM
|
Blue Streak
Joined on 06-18-2009
Posts 2
|
Re: AR2 RichEdit Control, Vertical Alignment
|
|
|
|
|
|
|
|
|
GrapeCity » Product Support » ActiveReports 2... » Re: AR2 RichEdit Control, Vertical Alignment
|
|
|
|
|