Recent

Author Topic: Weird ATTabs issue (have to click tab close button twice)  (Read 2977 times)

snorkel

  • Hero Member
  • *****
  • Posts: 817
Weird ATTabs issue (have to click tab close button twice)
« on: December 21, 2019, 07:07:16 am »
I use the ATTabs control to host forms like a MDI interface and I just noticed that on a couple of the forms when I load them up and display in the Attabs tabsheet that I have to click the tab twice or click once anywhere on the embedded form then click the tab close X and then it closes.   I have a couple of other forms that don't do that, I can just click the tab X close button and it closes on the first time.
It's like some thing is stealing the focus on certain forms.  I display all the embedded tabs the same way.

I also notices if I initiate the tab spawn from a double click even in a Virtual String Tree the focus stealing does not seem to happen and I can just click once to close the tab.  If I spawn the tab from a popup menu item then I have to click on the tab twice or click anywhere on the form then it closes in one click.

I don't know for sure but it seems to have started to happen after I updated to Laz 2.06  but that is just a observation. 
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Weird ATTabs issue (have to click tab close button twice)
« Reply #1 on: December 21, 2019, 06:57:21 pm »
UPDATE:
It only exhibits this behavior on linux when I compile it with GTK2, works fine on windows. will have to see it does it with QT5.
Also I updated my ATTabs to the latest version and that didn't help either.
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Weird ATTabs issue (have to click tab close button twice)
« Reply #2 on: December 22, 2019, 07:32:36 am »
UPDATE 2:
Did some more hacking around and discovered it's related to spawning the tabs from a popup menu that is assigned to a virtual string tree.
I use actions for everything and the odd thing is when I spawn the tab from a tool bar using the exact same action the tab closes on the first click.
Call the same action from the popup menu assigned to the tvirtualstringtree and I have to click anywhere on the embedded form(in the spawned tab) or click the tab close button twice.

Also no issues if the tab is spawned from the Tvirtualstringtrees on double click event.   Any tab created/spawned from the context of the popupmenu has issues.
NOTE:  this does not happen in windows, just Linux GTK2
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

 

TinyPortal © 2005-2018