Wish: Ctl-W sholud take to tab to the left or to previous

English support forum

Moderators: white, Hacker, petermad, Stefan2

icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Imho the only important info is whether the two clicks occur over TMyTabControl1 or 2 or not. First click is sent thru to TC and activates the tab, second one sends Ctrl-W plus Ctrl-Shift-Tab.

Icfu
This account is for sale
User avatar
Hacker
Moderator
Moderator
Posts: 13073
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Imho the only important info is whether the two clicks occur over TMyTabControl1 or 2 or not.
Unfortunately not. The user could have disabled activating inactive panel by clicking on its tabs, so Ctrl-Shift-Tab would change the tab in the wrong panel. If I would catch this situation by somehow finding out what the active panel is (I don't know how), then I also would have to find out if the user has set the option to activate the target panel or not.

And, just to note, the tab control is divided somehow in half in the middle of the panels - TMyPanel3 | TMyTabControl1 and TMyPanel7 | TMyTabControl2.

BTW: I won't be here the next three days, so anyone is welcome to enhance the script and convince me it was easy. ;)

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

You are right, some features I simply forget about...
In this case the script could be limited to specific standard settings.
And, just to note, the tab control is divided somehow in half in the middle of the panels - TMyPanel3 | TMyTabControl1 and TMyPanel7 | TMyTabControl2.
Can't reproduce that.
BTW: I won't be here the next three days, so anyone is welcome to enhance the script and convince me it was easy.
Not me, definetely. It's too hot and I don't want to prevent ghisler from implementing some basic features he could do himself in a few minutes. ;)

Icfu
This account is for sale
User avatar
Hacker
Moderator
Moderator
Posts: 13073
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Can't reproduce that.
Activate Window Spy and move the mouse over the leftmost tab header of one panel. You will see that it is a TMyPanel control that is under the mouse cursor. Now go to a tab header that is on the right side of the panel (you probably need many tabs) and you will see that TMyTabControl is the control's name now.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Using the up-to-date spy that is contained in AutoIt distribution, I don't get this strange result! When hovering the tabs, it always shows TMyTabControl!

I suppose that Windows Spy contained in AHK is buggy, maybe unsuitable for Delphi apps. It also doesn't highlight the active control, that's why I don't use it.

Icfu
This account is for sale
User avatar
szlori
Senior Member
Senior Member
Posts: 263
Joined: 2005-01-17, 07:12 UTC
Location: Sydney

Post by *szlori »

I use WinDowse (it gives you a wealth of information) and I also don't get this anomaly (all are TMyTabControl).

It is hard to believe that Christian implemented the tab bar using 2 separate tab controls. Otherwise all the tabs should simply be 1 single control (not each tab being a control).
TMyPanel is simply the class of the tab control's parent window.
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Well to see the structure, you can use the excellent TaskManager plugin:

Code: Select all

	TMyPanel
		TMyTabControl
			TMyPanel
			THeaderClick
			c:\Documents and Settings\
		[-c-]
		[_none_]  4 392 910 848 b of 39 999 987 712 b free
I switched to Linux, bye and thanks for all the fish!
Hammillian7
Junior Member
Junior Member
Posts: 98
Joined: 2003-07-16, 22:40 UTC
Location: Spain

Problem with AHK scritp when beginning on the rightmost TAB

Post by *Hammillian7 »

Hacker wrote:You could use a small AHK script to achieve what you desire:

Code: Select all

#IfWinActive, ahk_class TTOTAL_CMD
~$^w::Send, ^+{Tab}
HTH
Roman
There's one problem, though: If I begin from the rightmost tab, I key Ctl-T (TC opens a new Tab more to the right) and then I key Ctl-W, this time TC closes that last new tab and does take me to the previous to its left (now, the rightmost again). If the AHK script takes me still one more to the left, it puts me on a TAB one to the left of the one I was in the beginning.... :(
Hammillian7
Junior Member
Junior Member
Posts: 98
Joined: 2003-07-16, 22:40 UTC
Location: Spain

For me, previously Active would be enough!

Post by *Hammillian7 »

SanskritFritz wrote:Speaking of wishes, i want to add the following option as well:
Activate the previously active tab when closing a tab.
Activating the previously active TAB on close was my first and optimum whish. Activating the TAB to the left is just a sub-optimum wish, in case that the first one were too difficult for any reason (I think to remember having read something in the Forum about that wish being rejected).

If I could have Activating the previously active TAB on close (which, for me, would be TC's natural and expected behaviour), it would be very enough for me!.

And it wouldn't need to be configurable, exept if someone had already done some development based on current behaviour (which I consider improbable).

Thanks to all for your contributions.
User avatar
Hacker
Moderator
Moderator
Posts: 13073
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Hammillian7,
If I begin from the rightmost tab, I key Ctl-T (TC opens a new Tab more to the right) and then I key Ctl-W, this time TC closes that last new tab and does take me to the previous to its left (now, the rightmost again). If the AHK script takes me still one more to the left
Yes, sorry, I don't know how this could be solved.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply