Hi,
we have a problem changing a size of a Rectangle component via code of our report. Version is the last from 02.11.2009.
We're using the following code:
Dim Rectangle1 As Stimulsoft.Report.Components.StiRectanglePrimitive
Rectangle1= stireport1.GetComponentByName("Rectangle1")
Rectangle1.Width = 15.6
When the report is show it still show the old size of 19.8.
For other components like StiShape
Dim GeoForm As Stimulsoft.Report.Components.StiShape
GeoForm = stireport1.GetComponentByName("Geom_Formen1")
GeoForm.Width = 15.6
everything works fine.
Also if were using: Rectangle1.Enabled = False the rectangle is not show which is correct.
So i guess there must be something wrong setting the size of the rectangle seems it doesn't work correct.
We're using .DLL reports so we're not compiling the report again.
Any help ?
Thx
Problem with changing size of Rectangle
Problem with changing size of Rectangle
Hello,
The StiRectanglePrimitive consist of StiStartPointPrimitive and StiEndPointPrimitive. So to change Width and Height of the StiRectanglePrimitive from code you need to directly change coordinates of StiStartPointPrimitive and StiEndPointPrimitive. Please use the ClientRectangle property.
Thank you.
The StiRectanglePrimitive consist of StiStartPointPrimitive and StiEndPointPrimitive. So to change Width and Height of the StiRectanglePrimitive from code you need to directly change coordinates of StiStartPointPrimitive and StiEndPointPrimitive. Please use the ClientRectangle property.
Thank you.
Problem with changing size of Rectangle
Hi Andrew,Andrew wrote:Hello,
The StiRectanglePrimitive consist of StiStartPointPrimitive and StiEndPointPrimitive. So to change Width and Height of the StiRectanglePrimitive from code you need to directly change coordinates of StiStartPointPrimitive and StiEndPointPrimitive. Please use the ClientRectangle property.
Thank you.
i tried using the ClientRectangle, but this doesn't work also.
Here is a codesnippet how we call the report:
Dim Rechteck1 As Stimulsoft.Report.Components.StiRectanglePrimitive
Rechteck1 = stireport1.GetComponentByName("Rechteck1")
Rechteck1.ClientRectangle = New Stimulsoft.Base.Drawing.RectangleD(0, 2.8, 15.6, 2.8)
After setting the Rectangle we call:
stireport1.Show(Me, True)
But when the report is shown, the size of the above Rectangle still is (0,2.8,19.0,2,8)
Also were using .DLL reports cause they are much faster then using the .MRT files.
Any help ?
thx again
Stephan
Problem with changing size of Rectangle
Hello,
We have created a small sample how to change the size of StiRectanglePrimitive. Please see the attached file.
Thank you.
We have created a small sample how to change the size of StiRectanglePrimitive. Please see the attached file.
Thank you.
- Attachments
-
- 269.WindowsApplication1.zip
- (44.81 KiB) Downloaded 232 times
Problem with changing size of Rectangle
Hi Andrew,Andrew wrote:Hello,
We have created a small sample how to change the size of StiRectanglePrimitive. Please see the attached file.
Thank you.
thx that's working like a charm.
Cheers
Stephan
Problem with changing size of Rectangle
Hi Stephan,
Please let us know if any additional help is required.
Thank you.
Please let us know if any additional help is required.
Thank you.