Change tool | Rectangle text in code

TeeChart for ActiveX, COM and ASP
Post Reply
Kaprice
Newbie
Newbie
Posts: 11
Joined: Wed Aug 14, 2013 12:00 am

Change tool | Rectangle text in code

Post by Kaprice » Wed Oct 09, 2013 10:20 pm

I added 3 rectangles to my chart using the UI. Now, I want to modify the text at runtime. THIS doesn't seem to do anything:

Code: Select all

  With TChart_3MoScheduled
    .Tools.Items(0).asRectangle.Text = "$1,000"
    .Tools.Items(1).asRectangle.Text = "$10,000"
    .Tools.Items(2).asRectangle.Text = "$100,000"
  End With
I know I'm pointing to the right tools because when I put the above in debug.print lines, it shows the text as set via the UI.

So, what do I have to do to change the text at runtime?

Kaprice
Newbie
Newbie
Posts: 11
Joined: Wed Aug 14, 2013 12:00 am

Re: Change tool | Rectangle text in code

Post by Kaprice » Wed Oct 09, 2013 10:32 pm

Nevermind. It DOES work. I just had to close the form and run fresh. Just going from design view to form view didn't seem to want to update the text.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Change tool | Rectangle text in code

Post by Sandra » Thu Oct 10, 2013 3:18 pm

Hello Kaprice,

I am glad you can find the problem and solve it :).


Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply