TAdvPageControl

On the TAdvPageControl, there is an event called "OnDrawTab", most likely for the intention of making a custom drawing of the tabs.

Are there any property that must be set to true (or false) in order to bring this eventhandler to be fired?

br.

Anders

Yes, it is to perform custom drawing.
I have tested this here with a default TAdvPageControl on the form and assigning the OnDrawTab event here and I see this is being called.
Do you use the latest version and/or what are you doing different?

Hi Bruno

Sorry for the late reply
My version is:
2.0.1.7

by debugging, I can see that the "OnDrawTab" event is not fired.
br.
Anders

The latest version is v2.0.2.2 and with this version,I cannot reproduce an issue with OnDrawTab

Hi again Bruno


Just downloaded apparently most recent.

After installing (Delphi Rio SP2), the new version was:
2.0.2.0 (not 2.0.2.2)

And apparently the problem still persists.
br.

Anders

The latest version is in TMS VCL UI Pack v10.1.1.0 and is v2.0.2.2

If a problem persists with this latest version v2.0.2.2, please provide a sample source project + detailed steps to allow us to reproduce this here.

I have downloaded from

TMS Component pack
- not from TMS VCL UI Pack

Maybe it's the problem (?)
I do have a sample program, which I woukd like to send to you (can it be by e-mail?)

The steps:
Drop a TAdvPageControl on the form
Create 2 tabsheets
Define TabBorder3D property to True
Define the "OnDrawTab" event as follows:

procedure TForm1.AdvPageControl1DrawTab(Control: TCustomTabControl;
  TabIndex: Integer; const Rect: TRect; Active: Boolean);
begin
  case TabIndex of
  0:
    begin
      Control.Canvas.Brush.Color:=clGreen;
    end;
  1:
    begin
      Control.Canvas.Brush.Color:=clBlue;
    end;
  else
    Control.Canvas.Brush.Color:=clRed;
  end;
end;

I would expect that the tabs would be colored




The latest versions of the components are in TMS VCL UI Pack

https://www.tmssoftware.com/site/blog.asp?post=570

Hi again.


Now the version is 2.0.2.2

But still - I can't bring it to work.

Send please an email where I can send a small demo project (it only fill 6 KB)
Br.

Anders

https://www.tmssoftware.com/site/support_mail.asp