Recent

Author Topic: TDINotebook. How to close the tab by clicking the "X" next to the title  (Read 1552 times)

edsonjalves

  • New member
  • *
  • Posts: 9
I would like to have an icon on the tab to close the "tdinotebook" tab like in web browsers. This would be more intuitive for users already accustomed to browsers.

dsiders

  • Hero Member
  • *****
  • Posts: 1522
Re: TDINotebook. How to close the tab by clicking the "X" next to the title
« Reply #1 on: September 24, 2024, 07:33:22 pm »
I would like to have an icon on the tab to close the "tdinotebook" tab like in web browsers. This would be more intuitive for users already accustomed to browsers.

Isn't that what the CloseTabButtom (sp) is for?

edsonjalves

  • New member
  • *
  • Posts: 9
Re: TDINotebook. How to close the tab by clicking the "X" next to the title
« Reply #2 on: September 24, 2024, 10:56:27 pm »
I'm not referring to the close Tab button, but the close icon next to the tab title

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: TDINotebook. How to close the tab by clicking the "X" next to the title
« Reply #3 on: September 24, 2024, 11:06:37 pm »
afaik you are both talking about the same thing.

TTDINoteBook.Options and turn on nboShowCloseButtons
Today is tomorrow's yesterday.

CharlyTango

  • Full Member
  • ***
  • Posts: 177
Re: TDINotebook. How to close the tab by clicking the "X" next to the title
« Reply #4 on: September 28, 2024, 11:43:47 am »
TTDINoteBook.Options and turn on nboShowCloseButtons

in my experience, the close buttons on the tab do not work under windows, so this setting is ineffective.
Lazarus stable, Win32/64

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: TDINotebook. How to close the tab by clicking the "X" next to the title
« Reply #5 on: September 29, 2024, 05:01:00 am »
Thank you for the heads up CharlieTango.

I was not able to decipher the OS used by TS so no definitive answer/solution in that case.
Today is tomorrow's yesterday.

zeljko

  • Hero Member
  • *****
  • Posts: 1828
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: TDINotebook. How to close the tab by clicking the "X" next to the title
« Reply #6 on: September 29, 2024, 09:12:48 am »
There's no OnCloseTabClicked event like TPageControl have ?

CharlyTango

  • Full Member
  • ***
  • Posts: 177
Re: TDINotebook. How to close the tab by clicking the "X" next to the title
« Reply #7 on: September 29, 2024, 04:22:42 pm »
I would like to have an icon on the tab to close the "tdinotebook" tab like in web browsers. This would be more intuitive for users already accustomed to browsers.
I would also like to have close buttons in the tabs.

The derivation of TDINotebook looks like this:
TDINotebook
TExtendedNotebook
TPagecontrol
TCustomPageControl

At the level of TCustomPageControl it is possible to influence the behavior of the tabs, among other things with

Code: Pascal  [Select][+][-]
  1.   // These are LCL additions
  2.   TCTabControlOption = (
  3.     nboShowCloseButtons, nboMultiLine, nboHidePageListPopup,
  4.     nboKeyboardTabSwitch, nboShowAddTabButton, nboDoChangeOnSetIndex);  
  5.  

Apparently, however, the Windows widget set is not able to display close buttons on the individual tabs. Therefore, this is not the problem of TDINotebook but the request should go directly to Microsoft.
Lazarus stable, Win32/64

dseligo

  • Hero Member
  • *****
  • Posts: 1653
Re: TDINotebook. How to close the tab by clicking the "X" next to the title
« Reply #8 on: September 30, 2024, 12:15:28 am »
Apparently, however, the Windows widget set is not able to display close buttons on the individual tabs. Therefore, this is not the problem of TDINotebook but the request should go directly to Microsoft.

You also have some other controls that AFAIK can display close buttons, such as ATTabs: https://wiki.freepascal.org/ATTabs

CharlyTango

  • Full Member
  • ***
  • Posts: 177
Re: TDINotebook. How to close the tab by clicking the "X" next to the title
« Reply #9 on: October 02, 2024, 01:41:15 pm »
I'm not the maintainer of TDINotebook.

The only possibility would be forking TDINotebook and change the complete Tab-Mechanism to another control like ATTabs, which results in another component dependancy which i try to avoid.
Lazarus stable, Win32/64

 

TinyPortal © 2005-2018