11-14-2013, 02:51 AM
Hi All,
Anybody have ideas of how to make this work better.
I would like max min buttons to appear on the splitter itself. Since on splitter, they get attached to it and therefore alter their size problematically. Therefore, I had to put the Detach/Attach controls when moving the buttons following the splitter position. This seems to work ok but the presence of the buttons changes the max range so the max/min buttons only work in one direction.
Any ideas how to make this work better. I looked at draw_on_splitter
Thanks!!!
S
Function dlg_ButtonsOnSplitter
Anybody have ideas of how to make this work better.
I would like max min buttons to appear on the splitter itself. Since on splitter, they get attached to it and therefore alter their size problematically. Therefore, I had to put the Detach/Attach controls when moving the buttons following the splitter position. This seems to work ok but the presence of the buttons changes the max range so the max/min buttons only work in one direction.
Any ideas how to make this work better. I looked at draw_on_splitter
Quote:http://www.quickmacros.com/forum/viewtopic.php?p=25221but can't figure out how to extend to the buttons.
Thanks!!!
S
Function dlg_ButtonsOnSplitter
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "4 5"
str e4 e5
if(!ShowDialog("dlg_ButtonsOnSplitter" &dlg_ButtonsOnSplitter &controls)) ret
;BEGIN DIALOG
;0 "" 0x90CF0AC8 0x0 0 0 216 249 "Dialog"
;4 Edit 0x54231044 0x200 0 0 216 80 ""
;5 Edit 0x54230844 0x20000 0 94 216 114 ""
;1 Button 0x54030001 0x4 60 224 48 14 "OK"
;2 Button 0x54030000 0x4 124 224 48 14 "Cancel"
;3 Button 0x54032000 0x0 26 216 26 14 "▼"
;6 Button 0x54032000 0x0 0 216 26 14 "▲"
;7 QM_Splitter 0x54000000 0x0 0 80 216 14 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030605 "*" "" "" ""
ret
;messages
DlgSplitter ds.Init(hDlg 7)
sel message
,case WM_INITDIALOG
,,SetTimer hDlg 1 100 0
,case WM_TIMER
,,sel wParam
,,,case 1
,,,,int c=id(7 hDlg) ;;QM_Splitter
,,,,int x y cx cy
,,,,GetWinXY c x y cx cy hDlg
,,,,ds.AttachControls(0)
,,,,mov+ 0 y 40 cy id(3 hDlg) 1
,,,,mov+ 0 y 40 cy id(6 hDlg) 1
,,,,ds.AttachControls(1)
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 3 ds.SetPos(ds.GetMaxPos)
,case 6 ds.SetPos(0)
ret 1