Author Topic: Making text bold and set colors on MS Chart control  (Read 3710 times)

0 Members and 1 Guest are viewing this topic.

iliekater

  • Guest
Making text bold and set colors on MS Chart control
« on: May 08, 2007, 01:42:01 AM »
 Recently I discovered the MSChart control . It looks great , but I have a problem . I want to show a bold text at the bottom of the control , so I use the following code :
Code: [Select]
MyForm.MSChart.Footnote.Location.LocationType = VtChLocationTypeBottom
MyForm.MSChart.Footnote.Font.Bold = True

Although I manage to specify the position of the text (at the bottom) , I get an error message at the second line saying :

Quote
Property is write only .


What does it mean ? I press the Help button , but MSDN informs that I should create my own functions for handling the MSChart's errors . Yeah , thanks alot .
The strange thing is that I can actually make the text bold through the manual procedure (right click on the control > Properties > and so on ...) . But I want to do that by code . Is there a way ?

The other thing I can't do by code (but can do manually - but it's not what I want) , is to set the color for each of the columns . Does anyone know ho this is possible ?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Making text bold and set colors on MS Chart control
« Reply #1 on: May 08, 2007, 04:22:38 AM »
...............
Quote
Property is write only .


...........

Do you mean Read Only ??

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

iliekater

  • Guest
Re: Making text bold and set colors on MS Chart control
« Reply #2 on: May 08, 2007, 07:41:15 AM »
Nope ! I literaly meant "write-only" ! Here's the proof . In fact two proofs :

1) During execution :


2) In debug mode (see the yellow pop-up message) :

HarleyHetz

  • Guest
Re: Making text bold and set colors on MS Chart control
« Reply #3 on: May 17, 2007, 08:49:43 AM »
Try doing a "Debug.Print" on the property...just to see if it will "read" it.
Debug.Print THERMAL_Chart.MSChartTHERMAL.Footnote.Font.Bold

DaveW

  • Guest
Re: Making text bold and set colors on MS Chart control
« Reply #4 on: May 17, 2007, 09:21:47 AM »
If a property is write-only, then you can't retreive it. You can only set it.
Try using Let or Set



iliekater

  • Guest
Re: Making text bold and set colors on MS Chart control
« Reply #5 on: May 27, 2007, 06:24:12 PM »
Nope , all negativ . Oh well , I quess I'll have to do that manually .