Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Toolbar: Disable Equal buttons
#1
how do i remove the equal buttons option for a toolbar by script ?
or what is the right flag combination ?

bottom_bar_left
Code:
Copy      Help
;/mov 0 1176 /siz 1600 24 /isiz 16 16 /bsiz 120 /col 0x8000 0xFFFFFF /hcol "" 0xC0C0C0 /bmp "$my qm$\Toolbars\pi_theme_taskbar_bottom_bg.bmp"
help :mac "help_menu"
server_menu :mac "server_menu"
-
SnagIt32 :run "$program files$\TechSmith\SnagIt 8\SnagIt32.exe"
CamRecorder :run "$program files$\TechSmith\Camtasia Studio 4\CamRecorder.exe"
-
Adobe After Effects CS3 :run "D:\video\Adobe After Effects CS3\Support Files\AfterFX.exe" "" "" "D:\video\Adobe After Effects CS3\Support Files\"
Bridge :run "$program files$\Adobe\Adobe Bridge CS3\Bridge.exe"
Photoshop.exe :run "$program files$\Adobe\Adobe Photoshop CS3\Photoshop.exe"
-
ShellObjectEditor :run "C:\Shell\shell_objects\ShellObjectEditor.exe"
LinkMagic :run "C:\Shell\Junction Link Magic\LinkMagic.exe"
-
SciTE :run "$program files$\Scite\SciTE.exe"
pi
#2
Don't use /bsiz. It sets equal buttons option, because of toolbar control limitations.
#3
but i need /bsiz, otherwise the toolbar looks awful.
pi
#4
Found a way. Did't know that before, will add to QM in next release.

Function TbSetMaxButtonWidth
Code:
Copy      Help
;/
function hwndTb maxButtonWidth

;Set toolbar button max width when 'equal buttons' is unchecked.
;Note that checking/unchecking 'equal buttons' removes the button width limit.


;EXAMPLE
;TbSetMaxButtonWidth win("TOOLBAR28" "QM_toolbar") 100



int i h=id(9999 hwndTb)
TBBUTTONINFO t.cbSize=sizeof(t)
t.dwMask=TBIF_SIZE
for i 0 SendMessage(h TB_BUTTONCOUNT 0 0)
,SendMessage h TB_GETBUTTONINFO i &t
,if(t.cx<maxButtonWidth) continue
,t.cx=maxButtonWidth
,SendMessage h TB_SETBUTTONINFO i &t
#5
here is my working result

toolbar: bottom_bar_left
Code:
Copy      Help
;/mov 0 1176 /siz 1600 24 /isiz 16 16 /col 0x8000 0xFFFFFF /hcol "" 0xC0C0C0 /bmp "$my qm$\Toolbars\pi_theme_taskbar_bottom_bg.bmp" /hook _bottom_bar_left
help :mac "help_menu" "" xm ym-10 TPM_LEFTALIGN
server_menu :mac "server_menu" "" xm ym-10 TPM_LEFTALIGN
-
SnagIt32 :run "$program files$\TechSmith\SnagIt 8\SnagIt32.exe"
CamRecorder :run "$program files$\TechSmith\Camtasia Studio 4\CamRecorder.exe"
-
Adobe After Effects CS3 :run "D:\video\Adobe After Effects CS3\Support Files\AfterFX.exe" "" "" "D:\video\Adobe After Effects CS3\Support Files\"
Bridge :run "$program files$\Adobe\Adobe Bridge CS3\Bridge.exe"
Photoshop.exe :run "$program files$\Adobe\Adobe Photoshop CS3\Photoshop.exe"
-
Shell tools :mac "shell_tools_menu" "" xm ym-10 TPM_LEFTALIGN
-
SciTE :run "$program files$\Scite\SciTE.exe"

hook function: _bottom_bar_left

Code:
Copy      Help
;/bottom_bar_left
function hwnd message wParam lParam

sel message
,case WM_INITDIALOG
,,TbSetMaxButtonWidth hwnd 120
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)