Page 1 of 1

Change tool | Rectangle text in code

Posted: Wed Oct 09, 2013 10:20 pm
by 16666763
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?

Re: Change tool | Rectangle text in code

Posted: Wed Oct 09, 2013 10:32 pm
by 16666763
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.

Re: Change tool | Rectangle text in code

Posted: Thu Oct 10, 2013 3:18 pm
by 10050769
Hello Kaprice,

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


Thanks,