Tchart on a pagecontrol with XP Manifest included

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

Tchart on a pagecontrol with XP Manifest included

Post by Thomas Klingler » Wed Jun 27, 2007 10:10 am

Hello, I have a chart on a pagecontrol and the xpman on it.
While the tabsheets of the pagecontrol appear white on XP the TChart still stays in clbtnface. This look bad. Is there a way to avoid this and using the XP look ?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jun 27, 2007 10:30 am

Hi Thomas,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / 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

Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

Post by Thomas Klingler » Wed Jun 27, 2007 11:22 am

I upladed the sample project on your upload page. Please make sure that you test it on Windows XP.
Please notice, that you have a personal message.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jun 27, 2007 1:05 pm

Hello,

Thanks for the example project but I'm not able to reproduce what you report here. Using the project you sent the form, tabcontrol and chart are all in the same colour (default colour). Could you please check the project you sent? Should I do any special step to reproduce the issue here?

Thanks in advance.
Best Regards,
Narcís Calvet / 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

Frank Kneffel
Newbie
Newbie
Posts: 3
Joined: Thu Jul 06, 2006 12:00 am

Post by Frank Kneffel » Thu Jun 28, 2007 6:06 am

Hello,
the project is ok. Please make sure that you have a Windows XP system with Luna activated (ricght mousebutton on desktop, properties, design =Windows XP).
I also send you a screen shot of the programm on a clear XP system.
If you recompile my demo, make sure that you use Delphi 2006

moelski
Advanced
Posts: 212
Joined: Mon Apr 23, 2007 12:00 am
Location: Germany
Contact:

Post by moelski » Thu Jun 28, 2007 6:11 am

Hi Frank & Narcís,

I use XPman, too. And on my XP system is Luna activated. If I use XPMan in a project all things around TChart have the new style except TChart ...

@Narcís:
If you use my time Axis demo and put on a XPMan component you can see it, too. (My setup here D7 pro, XP with Luna).

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jun 28, 2007 11:44 am

Hi Frank,

Thanks for the information. I've been able to reproduce the issue here and a solution is making the chart transparent by setting its color to clNone:

Code: Select all

   Chart1.Color:=clNone;
Best Regards,
Narcís Calvet / 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

Frank Kneffel
Newbie
Newbie
Posts: 3
Joined: Thu Jul 06, 2006 12:00 am

Post by Frank Kneffel » Thu Jun 28, 2007 12:28 pm

Hi Narcís,
if I use color:=clnone; then the Chart appear white. Even on a windows 2000 OS. This is not what I want. If the user choose a XP theme with e.g. blue notebooks the chart background should appear blue. I guess the chart shoul look for the parent color.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jun 28, 2007 2:16 pm

Hi Frank,

Thanks for the information but the problem seems to be at TPanel. TChart inherits from TPanel component and it doesn't work with XPman either as reported in Quality Central issues below:

http://qc.borland.com/wc/qcmain.aspx?d=2534
http://qc.borland.com/wc/qcmain.aspx?d=6795

Anyway, we haven't been able to get them working with your example application and a TPanel in BDS 2006. Can you please try if suggestions here work fine at your end?
Best Regards,
Narcís Calvet / 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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jun 28, 2007 3:05 pm

Hi Frank,

Following up to this issue, another option is making the chart transparent modifying your example like this:

Code: Select all

unit Unit12;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, TeeProcs, TeEngine, Chart, ComCtrls, XPMan, TeeComma,
  StdCtrls;

type
  TForm12 = class(TForm)
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    TabSheet2: TTabSheet;
    XPManifest1: TXPManifest;
    Chart1: TChart;
    procedure FormCreate(Sender: TObject);
    procedure Chart1BeforeDrawChart(Sender: TObject);
  private
    { Private-Deklarationen }
    Back : TBitmap;
  public
    { Public-Deklarationen }
  end;

var
  Form12: TForm12;

implementation

{$R *.dfm}


procedure TForm12.Chart1BeforeDrawChart(Sender: TObject);
var rr: TRect;
begin
  if not Assigned(Back) then
  begin
    Back:=TBitmap.Create;
    Back.Width:=Chart1.Width;
    Back.Height:=Chart1.Height;
    rr := Chart1.BoundsRect;
    rr.Top:= rr.Top + 50;
    Back.Canvas.CopyRect(Chart1.ClientRect,Canvas,rr);
  end;

  if Chart1.Color=clNone then
     Chart1.Canvas.Draw(0,0,Back);
end;

procedure TForm12.FormCreate(Sender: TObject);
begin
  Chart1.Color:=clNone;
end;

end.
Best Regards,
Narcís Calvet / 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

Frank Kneffel
Newbie
Newbie
Posts: 3
Joined: Thu Jul 06, 2006 12:00 am

Post by Frank Kneffel » Fri Jun 29, 2007 4:46 am

Hi Narcís,
perfect. This one works fine for me.
Regards Frank Kneffel

Post Reply