Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pin/Unpin an Unshrunk Toolbar State
#1
Hi Gintaras, I have had great luck implementing a nice set of links on the Browser in TB. It's nice that it shrinks away right away when you move mouse off. However sometimes it would be nice if it would stay up.

I know how easy it is to make a regular widow "pinned" or "unpinned" using ont option from windows control menu. In fact, the toolbar window has this on. However, it's really the shrink state that I want to turn off or on:

I don't know whether the answer is in changing the auto-shrink flag or the size of the autshrink menu

I geuss I could do this by having a link on the shrinkable toolbar be actually a macro that closes the current toolbar and opens an identical one except for the change in shrink status. The problem with this is that it would not hold the pllace where you were in the browser.

Any more elegant solutions?

Thanks,
Stuart
#2
Not very elegant. Create function that right-clicks the toolbar and clicks 'auto shrink'.

Function TbPinToggle
Code:
Copy      Help
;/
function [$tbname]

;Clicks 'auto shrink' in the right-click menu of a QM toolbar.

;tbname - toolbar name. If omitted or "", the mouse pointer must be on the client area of a toolbar.


;right click
if(len(tbname))
,_s=tbname; _s.ucase
,rig 0 0 win(_s "QM_toolbar") 1; err ret
,mou
else rig
;wait for menu
int hwndmenu=wait(10 WV win("" "#32768" "qm")); err ret
;click 'auto shrink' item (key s does not work because keyboard input goes to currently active window).
Acc a=acc("Shrink" "MENUITEM" hwndmenu)
a.Mouse(1)
mou

Example toolbar
Code:
Copy      Help
Pin :TbPinToggle
Google :web "$favorites$\Google.url"
Forum :web "$favorites$\Forum.url"
#3
Will give it a try today and let you know!
Stuart
#4
Works Great but you have to take out the lock flag for "modify" if this was already set!

Stuart


Forum Jump:


Users browsing this thread: 1 Guest(s)