Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

TAdvPageControl

 Post Reply Post Reply
Author
Balslev Anders View Drop Down
New Member
New Member
Avatar

Joined: 11 Jun 2012
Posts: 34
Post Options Post Options   Quote Balslev Anders Quote  Post ReplyReply Direct Link To This Post Topic: TAdvPageControl
    Posted: 16 Nov 2019 at 5:48pm
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
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8601
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 17 Nov 2019 at 10:07am
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?
Back to Top
Balslev Anders View Drop Down
New Member
New Member
Avatar

Joined: 11 Jun 2012
Posts: 34
Post Options Post Options   Quote Balslev Anders Quote  Post ReplyReply Direct Link To This Post Posted: 05 Dec 2019 at 12:08pm
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
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8601
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 05 Dec 2019 at 12:09pm
The latest version is v2.0.2.2 and with this version,I cannot reproduce an issue with OnDrawTab
Back to Top
Balslev Anders View Drop Down
New Member
New Member
Avatar

Joined: 11 Jun 2012
Posts: 34
Post Options Post Options   Quote Balslev Anders Quote  Post ReplyReply Direct Link To This Post Posted: 05 Dec 2019 at 12:32pm
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
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8601
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 05 Dec 2019 at 2:47pm
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.
Back to Top
Balslev Anders View Drop Down
New Member
New Member
Avatar

Joined: 11 Jun 2012
Posts: 34
Post Options Post Options   Quote Balslev Anders Quote  Post ReplyReply Direct Link To This Post Posted: 05 Dec 2019 at 3:17pm
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




Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8601
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 05 Dec 2019 at 3:18pm
The latest versions of the components are in TMS VCL UI Pack
Back to Top
Balslev Anders View Drop Down
New Member
New Member
Avatar

Joined: 11 Jun 2012
Posts: 34
Post Options Post Options   Quote Balslev Anders Quote  Post ReplyReply Direct Link To This Post Posted: 05 Dec 2019 at 3:51pm
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
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8601
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 05 Dec 2019 at 3:53pm
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down