Themes CBuilder again
Posted: Thu Dec 08, 2005 5:05 am
Hi Narcis,
Thanks for the examples you sent. I sent you an email back, but did not get a response. The example you sent is posted below.
Interestingly, the ones you commented out did not work (even after I uncommented them:)) and the ones that were not commented did work.
Does this mean that they should work, but do not? Again, I understand there are working demos in Delphi, but is there something available in Builder? If it is futile to use themes in Builder I would like to know now before I blow any time.
Next question: "Smooth" only seems to have an affect in the gallery, but has no noticeable affect on the chart itself either in 2D or 3D. Is there something I need to do to fix that?
Thanks
TT
<<
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "TeeThemeEditor.hpp"
#pragma link "TeeThemeEditor"
#include "Chart_Themes.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "Base"
#pragma resource "*.dfm"
TChartThemes *ChartThemes;
//---------------------------------------------------------------------------
__fastcall TChartThemes::TChartThemes(TComponent* Owner)
: TBaseForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TChartThemes::FormCreate(TObject *Sender)
{
Series1->FillSampleValues();
Series1->ColorEachPoint = true;
// Add all available themes to ListBox1.
AddChartThemes(ListBox1->Items);
// Select first theme (TeeChart default theme)
ListBox1->ItemIndex = 0;
}
//---------------------------------------------------------------------------
void __fastcall TChartThemes::Button1Click(TObject *Sender)
{
// Show the Chart Theme editor
TChartThemeClass tmp = ChartThemeSelector(Chart1);
if (tmp!=NULL)
{
// ListBox1->ItemIndex = ListBox1->Items->IndexOfObject(tmp);
}
}
//---------------------------------------------------------------------------
void __fastcall TChartThemes::ListBox1Click(TObject *Sender)
{
// TChartThemeClass tmp = __classid(ListBox1->Items->Objects[ListBox1->ItemIndex]);
// Change Theme. The last parameter "-1" means to use the
// default Theme color palette.
// ApplyChartTheme(tmp,Chart1,-1);
}
//---------------------------------------------------------------------------
>>
Thanks for the examples you sent. I sent you an email back, but did not get a response. The example you sent is posted below.
Interestingly, the ones you commented out did not work (even after I uncommented them:)) and the ones that were not commented did work.
Does this mean that they should work, but do not? Again, I understand there are working demos in Delphi, but is there something available in Builder? If it is futile to use themes in Builder I would like to know now before I blow any time.
Next question: "Smooth" only seems to have an affect in the gallery, but has no noticeable affect on the chart itself either in 2D or 3D. Is there something I need to do to fix that?
Thanks
TT
<<
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "TeeThemeEditor.hpp"
#pragma link "TeeThemeEditor"
#include "Chart_Themes.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "Base"
#pragma resource "*.dfm"
TChartThemes *ChartThemes;
//---------------------------------------------------------------------------
__fastcall TChartThemes::TChartThemes(TComponent* Owner)
: TBaseForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TChartThemes::FormCreate(TObject *Sender)
{
Series1->FillSampleValues();
Series1->ColorEachPoint = true;
// Add all available themes to ListBox1.
AddChartThemes(ListBox1->Items);
// Select first theme (TeeChart default theme)
ListBox1->ItemIndex = 0;
}
//---------------------------------------------------------------------------
void __fastcall TChartThemes::Button1Click(TObject *Sender)
{
// Show the Chart Theme editor
TChartThemeClass tmp = ChartThemeSelector(Chart1);
if (tmp!=NULL)
{
// ListBox1->ItemIndex = ListBox1->Items->IndexOfObject(tmp);
}
}
//---------------------------------------------------------------------------
void __fastcall TChartThemes::ListBox1Click(TObject *Sender)
{
// TChartThemeClass tmp = __classid(ListBox1->Items->Objects[ListBox1->ItemIndex]);
// Change Theme. The last parameter "-1" means to use the
// default Theme color palette.
// ApplyChartTheme(tmp,Chart1,-1);
}
//---------------------------------------------------------------------------
>>