Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-01

Is the TTabControl.OnDrawTab working on Windows?

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

silvioprog

Hello,

Just try the following steps:

. Open Lazarus IDE with its empty Form1;
. Put a TabControl1 in the Form1 and add one or more tabs;
. Implement the OnDrawTab event with this code:
  procedure TForm1.TabControl1DrawTab(Control: TCustomTabControl;
    TabIndex: Integer; const Rect: TRect; AActive: Boolean);
  begin
    ShowMessage('OK');
  end;

. Compile and run the project.

You can't see any message.

Now set True in the TabControl1.OwnerDraw and try the tests above again, you can't see any message btw.

So, is the OnDrawTab event working on Windows?

PS. I did this same test on GTK and I found same problem there too.

Silvio Cl?cio -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160129/83f2b972/attachment.html>

Reply by email

Bart
to silvioprog
silvioprog wrote 6 lines
Now set True in the TabControl1.OwnerDraw and try the tests above again, you can't see any message btw. So, is the OnDrawTab event working on Windows? PS. I did this same test on GTK and I found same problem there too.

I commented out the entire definition of (F)OnDrawTab and the LCL still compiled fine.
So, it seems this eventhandler is never invoked at all. (Tested on Windows)

Bart

Reply by email

silvioprog
to Bart
Bart wrote 13 lines
On 1/29/16, silvioprog wrote: > Now set True in the TabControl1.OwnerDraw and try the tests above again, > you can't see any message btw. > > So, is the OnDrawTab event working on Windows? > > PS. I did this same test on GTK and I found same problem there too. I commented out the entire definition of (F)OnDrawTab and the LCL still compiled fine. So, it seems this eventhandler is never invoked at all. (Tested on Windows)

Hm... I'm going to issue that ...

Silvio Cl?cio -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160130/5cd7b4c1/attachment.html>

Reply by email

silvioprog
to silvioprog
silvioprog wrote 19 lines
On Sat, Jan 30, 2016 at 10:34 AM, Bart wrote: > On 1/29/16, silvioprog wrote: > > > Now set True in the TabControl1.OwnerDraw and try the tests above again, > > you can't see any message btw. > > > > So, is the OnDrawTab event working on Windows? > > > > PS. I did this same test on GTK and I found same problem there too. > > I commented out the entire definition of (F)OnDrawTab and the LCL > still compiled fine. > So, it seems this eventhandler is never invoked at all. > (Tested on Windows) Hm... I'm going to issue that ...

Done. #29543 <http://bugs.freepascal.org/view.php?id=29543>

Silvio Cl?cio -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160130/de3935d4/attachment.html>

Reply by email