Recent

Author Topic: Tpagecontrol : Ttabsheet close button  (Read 16219 times)

mmab

  • Jr. Member
  • **
  • Posts: 89
Tpagecontrol : Ttabsheet close button
« on: January 27, 2010, 11:33:06 am »

It would be great if Ttabsheet has a close button at the caption area.
or option to put it.
I know it is possible in QT. It there any intention to add this capability?

thanks


 

davesimplewear

  • Sr. Member
  • ****
  • Posts: 321
    • Davids Freeware
Re: Tpagecontrol : Ttabsheet close button
« Reply #1 on: January 27, 2010, 10:37:00 pm »
I'm fairly sure the TNotebook has this in the Options, but as you say it would be good for TTabsheet and TPageControl as well.
All things considered insanity seems the best option

mmab

  • Jr. Member
  • **
  • Posts: 89
Re: Tpagecontrol : Ttabsheet close button
« Reply #2 on: January 28, 2010, 01:59:56 am »
I'm fairly sure the TNotebook has this in the Options, but as you say it would be good for TTabsheet and TPageControl as well.


I've tried what you've mentioned. But it looks like TNotebook's close button property is not working for me.My platform is
Win XP, Laz. 0.9.29.22078 fpc 2.2.4. ( not a stable version)
However I've also tried in the stable version but it  didnt work also.
Can you please test it? I dont want to put a post to bugtracker until I am sure.

Thanks for the reply.



Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Tpagecontrol : Ttabsheet close button
« Reply #3 on: January 28, 2010, 08:39:17 am »
Quote
But it looks like TNotebook's close button property is not working for me
Perhaps this is why there's no close button on editor tabs in Lazarus for Windows. Linux GTK+ has this though.

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
Re: Tpagecontrol : Ttabsheet close button
« Reply #4 on: April 16, 2010, 01:39:23 am »
Close button on Tabs is only available for Qt and Gtk.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Tpagecontrol : Ttabsheet close button
« Reply #5 on: April 16, 2010, 03:52:33 am »
Quote
Close button on Tabs is only available for Qt and Gtk.
But why some Windows projects have it? Take a look, for example Notepad++.

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
Re: Tpagecontrol : Ttabsheet close button
« Reply #6 on: April 16, 2010, 03:00:13 pm »
Windows API does not give a direct way to do this. You can draw the tab yourself of course and handle clicks.

eny

  • Hero Member
  • *****
  • Posts: 1653
Re: Tpagecontrol : Ttabsheet close button
« Reply #7 on: May 10, 2010, 04:01:21 pm »
But why some Windows projects have it? Take a look, for example Notepad++.
I wouldn't mention Notepad++ when talking about an application that behaves well.
The biggest bug: Ctrl-F4 doesn't close a document, which for a text editor (i.e. heavy keyboard usage) is a major showstopper.
(And the 2nd one: RE's are so limited they are virtually unusable.)
All posts based on: Win10 (Win64); Lazarus 3_4  (x64) 25-05-2024 (unless specified otherwise...)

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2673
Re: Tpagecontrol : Ttabsheet close button
« Reply #8 on: May 13, 2010, 03:51:27 pm »
Windows API does not give a direct way to do this. You can draw the tab yourself of course and handle clicks.

And even if you draw it yourself you wouldn't get it 100% the same in vista or win7. I needed some hacks to draw themed tabs on XP, on vista/win7 the winapi lacks one message to draw the "orange" mouseover colors.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018