AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Tab control TCS_MULTISELECT

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Terrapin



Joined: 15 Aug 2005
Posts: 107
Location: North Carolina

PostPosted: Thu Nov 02, 2006 12:25 am    Post subject: Tab control TCS_MULTISELECT Reply with quote

Code:
Gui, Add, Tab, x0 y26 vTabs gTabs +Theme +0x104


Has anyone used the 0x4 Tab Control style? It seems to work as expected, but turning it on also seems to cause the hovered tab to be visually selected on a right-click. Also, the control's associated variable seems to be null, at that point, until a tab is selected in one of the regular manners.

Unless I've missed something, it seems the best way for the control to react to right-clicks would be just the same as if multiselect was not on (no change in selected tab). I am generating a right-click context menu. Not wanting the selected tab to change.

Thanks,

Bob

Edit, Here's some sample code to illustrate:

Code:
Gui, Add, Tab, x0 y26 vTabs gTabs +Theme +0x104 w600 h26, red|green|blue
Gui, Show, , MultiSelect Tabs
return

Tabs:
  TrayTip, gTabs, %Tabs%`n==================
return

GuiContextMenu:
   Gui, Submit, NoHide
   TrayTip, Context, %Tabs%`n================
return
Back to top
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Thu Nov 02, 2006 10:21 am    Post subject: Reply with quote

Thanks for example script, it helps... You forgot one Gui Submit. Wink
I played a bit with the script, but got no result.
Code:
Gui Add, Tab, x0 y26 vtabName gTabs +0x104 w600 h26, red|green|blue
Gui Show, , MultiSelect Tabs
Return

Tabs:
   Gui Submit, NoHide
   TrayTip gTabs, %tabName% - %A_GuiControl% - %A_GuiControlEvent% - %A_EventInfo%`n==================
return

GuiContextMenu:
   Gui Submit, NoHide
   TrayTip Context, %tabName% - %A_GuiControl% - %A_GuiControlEvent% - %A_EventInfo% - %A_GuiX%/%A_GuiY%`n--------------------------------
Return

GuiClose:
GuiEscape:
ExitApp

Now, perhaps you can explain what you are trying to do, perhaps there is a workaround.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
Terrapin



Joined: 15 Aug 2005
Posts: 107
Location: North Carolina

PostPosted: Fri Nov 03, 2006 5:14 pm    Post subject: Reply with quote

Hi PhiLho, thanks. When clicking on a tab: (from the manual)

Code:
A g-label such as gMySubroutine may be listed in the control's options. This would cause the MySubroutine label to be launched automatically whenever the user changes to a new tab. If the tab control has both a g-label and an output variable, whenever the user switches to a new tab, the output variable will be set to the previously selected tab name (or number in the case of AltSubmit).


So, unless I'm mistaken, Gui Submit is not needed there. As a matter of fact, I believe it will change the associated variable to the currently selected tab rather than the one 'previously selected'.

Yes, I tried the built-in vars too, no luck.

I was tinkering around with an idea I've had for a long time. My desktop gets cluttered up (just like my real one) with files because I tend to use it like a real desktop, dropping things there, and putting downloaded files, etc. I wanted to make a script similar to a freeware program I've tried called Smart Desktop 1.1.0. The idea is ok, but sadly the program fails in many ways. I would like to use the actual desktop on windows, and using an 'auto-hide' toolbar (with the tabs being buttons), it would allow the addition and deletion of tabs which represent 'desk drawers'. I might have:
Default | Music | Downloads | etc

I discovered the multiselect style, and thought it would be cool to allow showing desktop files for multiple drawers, on the desktop. I've pretty much given up on that, however, since selecting with ctrl-click in any way leaves the variable null.

All Exclamation I really need to do at this point, is move files to and away from the desktop folder, appropriately as tabs are clicked. I have not worked with this yet, but I hope that insuring the storage directory for 'hidden' desktop icons/files is on the same volume as the desktop, so the directory entries only, will be moved.

So, if it works, what I'll have are 'desk drawers' so that I can see groups of files on the desktop and work with them, without others getting in the way. Swap them in and out.

I'm using Laszlo's List functions now, for maintaining the tab control list. I am amazed at what he has done with these.

Thanks, if you have any suggestions, please suggest! BTW, Smart Desktop creates a ListView to display tabbed 'desktops' and is very buggy. Also, it does not function like the real desktop would. But the idea is good, I think.

Bob

Edit, here's a link to a capture shot of the bar and context-menu on my desktop. Only about 20k. http://deepelem.us/image3.png
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group