setleave() on static
Posted: Sun Jan 11, 2015 2:00 am
Hello,
I try to make a metro like dialog. For showing a menu on the right side when moving the mouse over the right border of the window , I use a inivisible button and o:setenter() to show the dialog. But I would like to close the dialog when the mouse moves outside this dialog. I try it with o:setleave(), but it does not work. Any idea why ?
This is my code:
Attached a screenshot.
regards
Rudolf
I try to make a metro like dialog. For showing a menu on the right side when moving the mouse over the right border of the window , I use a inivisible button and o:setenter() to show the dialog. But I would like to close the dialog when the mouse moves outside this dialog. I try it with o:setleave(), but it does not work. Any idea why ?
This is my code:
Code: Select all
Button on the right side:
@ 2,DSIZE_X-5 DCSTATIC SIZE 10,DSIZE_Y-4 PIXEL COLOR GRA_CLR_DARKBLUE,GRA_CLR_DARKBLUE OBJECT oMenuStatic EVAL {|o|o:setenter({|| xMenu2(getlist,oDialog)})}
xMenu dialog:
DCREAD GUI OPTIONS GetOptions EVAL {|o|o:setleave({||DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList)}),DC_SetWindowTransparency(o:getHwnd(),100), Sleep(1), o:show(), ShowNewUserWindow2(o)} MODAL PARENT @oDlg
regards
Rudolf