Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Button position in TB
#1
Seems like a simple question, but I can't find any info in help or forum:
How do you specify where to place a button on a toolbar?
For example, I want a button to be aligned along the bottom of the toolbar with a large space at the top of the toolbar.
#2
Buttons cannot be moved, but you can move child toolbar control. You need toolbar hook function.

Toolbar
Code:
Copy      Help
;/hook tb_move_child_tb_hook /siz 100 100
qm :run "$qm$\qm.exe" "v" "" "*"

Function tb_move_child_tb_hook
Code:
Copy      Help
;/
function# hWnd message wParam lParam

sel message
,case WM_INITDIALOG ;;QM 2.2.0
,mov 0 50 id(9999 hWnd)
,
,case WM_SIZE
,ret 1 ;;prevent restoring child tb position when resized
#3
Wow that was easy, I should have thought of that.
It also works when called from another non-hook function: siz 0 50 id(9999 win("TOOLBAR2" "QM_toolbar"))
Thanks!


Forum Jump:


Users browsing this thread: 1 Guest(s)