TheSwamp

Code Red => VB(A) => Topic started by: iliekater on May 08, 2007, 01:42:01 AM

Title: Making text bold and set colors on MS Chart control
Post by: iliekater 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 ?
Title: Re: Making text bold and set colors on MS Chart control
Post by: Kerry on May 08, 2007, 04:22:38 AM
...............
Quote
Property is write only .


...........

Do you mean Read Only ??

Title: Re: Making text bold and set colors on MS Chart control
Post by: iliekater 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 :
(http://img519.imageshack.us/img519/2179/96625117mu6.jpg) (http://imageshack.us)

2) In debug mode (see the yellow pop-up message) :
(http://img240.imageshack.us/img240/2703/23692547ia4.jpg) (http://imageshack.us)
Title: Re: Making text bold and set colors on MS Chart control
Post by: HarleyHetz 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
Title: Re: Making text bold and set colors on MS Chart control
Post by: DaveW 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


Title: Re: Making text bold and set colors on MS Chart control
Post by: iliekater on May 27, 2007, 06:24:12 PM
Nope , all negativ . Oh well , I quess I'll have to do that manually .