Recent

Author Topic: [New Component] ExtTabCtrl - A custom, feature-rich tab control (LGPL)  (Read 6233 times)

d7_2_laz

  • Hero Member
  • *****
  • Posts: 696
Re: [New Component] ExtTabCtrl - A custom, feature-rich tab control (LGPL)
« Reply #135 on: July 03, 2026, 04:55:14 pm »
Yes. Mainly the TNotebook and TPageControl versions only would differ a bit in class object and property names but would look quite near. For the statement mentioned:

Code: Pascal  [Select][+][-]
  1.   ExtTabCtrl1:= TExtTabCtrl.Create(Self);
  2.   with ExtTabCtrl1 do begin
  3.        Parent := Notebook1;
i've never had an issue.

Quote
"Why don't you put both components on a Panel or a Frame?"
Of course one can do, as a kind of a 'little positioning-helper' (and analogous to when using a TNotebook and wanting to have borders around here). No prob, i simply was wondering why.

Lazarus 4.8  FPC 3.2.2 Win11 64bit

d7_2_laz

  • Hero Member
  • *****
  • Posts: 696
Re: [New Component] ExtTabCtrl - A custom, feature-rich tab control (LGPL)
« Reply #136 on: July 04, 2026, 03:01:03 pm »
Tried if i could recreate the features as discussed earlier based on TExtPageCtrl now, here too doing runtime-creation of the objects. It works fine (since the update from yesterday).

Only a trap at the end: when doing a "ExtPageCtrl1.Free" at FormClose i get an access violation executing a Null address, caused by: procedure TExtPage.UnlinkTab, line: "FTab.Free;"
Does it work on your side when dynamically creating the objects?
     
Lazarus 4.8  FPC 3.2.2 Win11 64bit

ovidio

  • Jr. Member
  • **
  • Posts: 68
Re: [New Component] ExtTabCtrl - A custom, feature-rich tab control (LGPL)
« Reply #137 on: July 04, 2026, 06:34:15 pm »
Tried if i could recreate the features as discussed earlier based on TExtPageCtrl now, here too doing runtime-creation of the objects. It works fine (since the update from yesterday).

Only a trap at the end: when doing a "ExtPageCtrl1.Free" at FormClose i get an access violation executing a Null address, caused by: procedure TExtPage.UnlinkTab, line: "FTab.Free;"
Does it work on your side when dynamically creating the objects?
   

Thank you for testing it. Yes, it works OK when creating the components via Lazarus. I will check what might produce the problem.

EDIT: Please, can you review if the bug was fixed? Please, note that there are some additional changes (in particular, the signature of OnDrawTab has changed), because I was in the middle of a refactoring.
« Last Edit: July 05, 2026, 05:33:01 pm by ovidio »

d7_2_laz

  • Hero Member
  • *****
  • Posts: 696
Re: [New Component] ExtTabCtrl - A custom, feature-rich tab control (LGPL)
« Reply #138 on: July 06, 2026, 09:17:35 am »
EDIT: Please, can you review if the bug was fixed? Please, note that there are some additional changes (in particular, the signature of OnDrawTab has changed), because I was in the middle of a refactoring.
Yes, this is fixed.
But (with runtime-created ExtPageCtrl:) closebutton clicks do misbehave here (more details later if needed). Does this work correctly on your side?
Lazarus 4.8  FPC 3.2.2 Win11 64bit

ovidio

  • Jr. Member
  • **
  • Posts: 68
Re: [New Component] ExtTabCtrl - A custom, feature-rich tab control (LGPL)
« Reply #139 on: July 06, 2026, 10:10:51 am »
But (with runtime-created ExtPageCtrl:) closebutton clicks do misbehave here (more details later if needed). Does this work correctly on your side?

Yes, please, give me more details. In all my tests they behave as expected.

d7_2_laz

  • Hero Member
  • *****
  • Posts: 696
Re: [New Component] ExtTabCtrl - A custom, feature-rich tab control (LGPL)
« Reply #140 on: July 06, 2026, 10:28:47 am »
Then i'll prepare you a simplified testcase (later this day). - Actually i have:
- click onto the rightmost button: access violation (when having started the project within the IDE);
- click onto any other closebutton: the page belonging to the tab that will be now shifted to be the current one disappears (and reappears only after having selected this tab manually again).
Lazarus 4.8  FPC 3.2.2 Win11 64bit

ovidio

  • Jr. Member
  • **
  • Posts: 68
Re: [New Component] ExtTabCtrl - A custom, feature-rich tab control (LGPL)
« Reply #141 on: July 06, 2026, 11:43:56 am »
Then i'll prepare you a simplified testcase (later this day). - Actually i have:
- click onto the rightmost button: access violation (when having started the project within the IDE);
- click onto any other closebutton: the page belonging to the tab that will be now shifted to be the current one disappears (and reappears only after having selected this tab manually again).

Well, I found a bug in keeping PageIndex and TabIndex in sync when a Tab/Page is deleted. Can you test if this fixes your problem? If not, I will need the test case to find the bug.

d7_2_laz

  • Hero Member
  • *****
  • Posts: 696
Re: [New Component] ExtTabCtrl - A custom, feature-rich tab control (LGPL)
« Reply #142 on: July 06, 2026, 03:07:00 pm »
That's it - this fixes the second issue (with the lost pages).
The first issue (with the rightmost closebutton) turned out to be due to a lack in my own test project within the TabChanging event handler (a condition was missing here that i previously hadn't needed).
All fine now so far ..

Lazarus 4.8  FPC 3.2.2 Win11 64bit

ovidio

  • Jr. Member
  • **
  • Posts: 68
Re: [New Component] ExtTabCtrl - A custom, feature-rich tab control (LGPL)
« Reply #143 on: July 09, 2026, 09:12:56 am »
That's it - this fixes the second issue (with the lost pages).
The first issue (with the rightmost closebutton) turned out to be due to a lack in my own test project within the TabChanging event handler (a condition was missing here that i previously hadn't needed).
All fine now so far ..

Good to know that it was fixed.

 

TinyPortal © 2005-2018