Vertical Positioning of RTF Controls
Vertical Positioning of RTF Controls
I am trying to center a rich text box vertically withing a page. Is there a way to accomplish this?
Vertical Positioning of RTF Controls
An update:
I tried to put this in the BeforePrint event:
RichText1.Top = (DataBand1.Height / 2) - (RichText1.Height /2)
The problem is that I'm getting the height of the component as it is in the designer. Not the rendered component (which resizes itself based on the content).
I tried to put this in the BeforePrint event:
RichText1.Top = (DataBand1.Height / 2) - (RichText1.Height /2)
The problem is that I'm getting the height of the component as it is in the designer. Not the rendered component (which resizes itself based on the content).
Vertical Positioning of RTF Controls
Hi
Is it possible to place a panel component in the Page and then to place a databand with that RichText into this Panel?
Or just to place a Richtext in the page according with requirements to centre it?
Thank you.
Is it possible to place a panel component in the Page and then to place a databand with that RichText into this Panel?
Or just to place a Richtext in the page according with requirements to centre it?
Thank you.
Vertical Positioning of RTF Controls
Neither of these options give me the ability to center it vertically
Vertical Positioning of RTF Controls
How would you accomplish this in this report (taken from the demo reports shipped with StimulReports
- Attachments
-
- 284.Richtext.mrt
- (15.79 KiB) Downloaded 322 times
Vertical Positioning of RTF Controls
Hi
Thank you for the sample report. It helped as always to understand your task
Please add the following code for this attached report into EndRender event of the report object.
For this select 'Report' object in the 'Properties' window in the Designer and add the following code there:
foreach (StiPage page in this.RenderedPages)
Thank you.
Thank you for the sample report. It helped as always to understand your task

Please add the following code for this attached report into EndRender event of the report object.
For this select 'Report' object in the 'Properties' window in the Designer and add the following code there:
foreach (StiPage page in this.RenderedPages)
Code: Select all
{
foreach (StiComponent comp in page.Components)
{
if (comp.Name == "RichText1")
{
comp.Top = page.Height/2-comp.Height/2;
}
}
}
- Attachments
-
- 287.Richtext_AndEndRender_Event.mrt
- (16.02 KiB) Downloaded 330 times