TDINotebook. How to close the tab by clicking the "X" next to the title lazarus / 21-General ---------------------------------------------------------------------- edsonjalves · 2024-09-24 17:16 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 · 2024-09-24 17:33 Quote from: edsonjalves on September 24, 2024, 07:16:13 pmI 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 · 2024-09-24 20:56 I'm not referring to the close Tab button, but the close icon next to the tab title ---------------------------------------------------------------------- TRon · 2024-09-24 21:06 afaik you are both talking about the same thing. TTDINoteBook.Options and turn on nboShowCloseButtons ---------------------------------------------------------------------- CharlyTango · 2024-09-28 09:43 Quote from: TRon on September 24, 2024, 11:06:37 pmTTDINoteBook.Options and turn on nboShowCloseButtons in my experience, the close buttons on the tab do not work under windows, so this setting is ineffective. ---------------------------------------------------------------------- TRon · 2024-09-29 03:01 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. ---------------------------------------------------------------------- zeljko · 2024-09-29 07:12 There's no OnCloseTabClicked event like TPageControl have ? ---------------------------------------------------------------------- CharlyTango · 2024-09-29 14:22 Quote from: edsonjalves on September 24, 2024, 07:16:13 pmI 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   // These are LCL additions  TCTabControlOption = (    nboShowCloseButtons, nboMultiLine, nboHidePageListPopup,    nboKeyboardTabSwitch, nboShowAddTabButton, nboDoChangeOnSetIndex); 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. ---------------------------------------------------------------------- dseligo · 2024-09-29 22:15 Quote from: CharlyTango on September 29, 2024, 04:22:42 pmApparently, 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 · 2024-10-02 11:41 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.