AutoHotkey Community

It is currently May 27th, 2012, 9:45 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: November 2nd, 2006, 12:25 am 
Offline

Joined: August 15th, 2005, 7:15 am
Posts: 107
Location: North Carolina
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 2nd, 2006, 10:21 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Thanks for example script, it helps... You forgot one Gui Submit. ;-)
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.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2006, 5:14 pm 
Offline

Joined: August 15th, 2005, 7:15 am
Posts: 107
Location: North Carolina
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 :!: 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


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], Maestr0, tomoe_uehara, XstatyK and 54 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group