TeeChart .NET version 2.0.2040.15119
Hi, when you set the Opacity of your form to 0 and then to 1
then the rectangle outlining the zoom area stays invisible.
(Reason for doing this:
One may start with Opacity 0 and then gradually increase it
to blend-in the form through a timer, reaching Opacity 1).
See example below. Is there a work aournd?
public X_MainWindow()
{
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
this.Opacity = 0.0;
this.Opacity = 1.0;
etc.
Thanks,
fano
Zoom rectangle invisible if form opacity set to 0 and then 1
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi fano,
I've been able to reproduce what you reported and found that this can be solved assigning zoom pen's color after setting opacity=1, i.e.:
The story is that this line: tChart1.Zoom.Pen.Color=Color.Black; Doesn't need to be set more than once. If this property is not set then the zoom rectangle will be drawn with System.Windows.Forms.ControlPaint. Which behaves as you can see when Form.Opacity is set. However, I have done some research in internet and Microsoft's documentation and haven't found any piece of information about that. So there's not much we can do for now.
BTW: I also noticed that setting zoom pen's color before applying initial opacity to your form works as well. This option may be more convenient for your needs.
I've been able to reproduce what you reported and found that this can be solved assigning zoom pen's color after setting opacity=1, i.e.:
Code: Select all
private void timer1_Tick(object sender, System.EventArgs e)
{
while (this.Opacity<1.0) this.Opacity+=0.01;
timer1.Enabled=false;
tChart1.Zoom.Pen.Color=Color.Black;
}
BTW: I also noticed that setting zoom pen's color before applying initial opacity to your form works as well. This option may be more convenient for your needs.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |