Page 1 of 1

eXpress++ DCMESSAGEBOX MOTION

Posted: Sat Nov 05, 2022 3:18 am
by slobodan1949
Can someone tell me how to solve this problem:

TESTED UDER WINDOWS 10, WINDOWS 11
----------------------------------
DCMESSAGEBOX MOTION DOESN'T WORK
WITH PUSHBUTTON MESSAGE AND PUSHBUTTONXP MESSAGE
AND IT WORKS WITH DCMENUITEM MESSAGE

TESTED UDER WINDOWS 7
---------------------
DCMESSAGEBOX MOTION WORK
WITH PUSHBUTTON MESSAGE AND PUSHBUTTONXP MESSAGE
AND IT WORKS WITH DCMENUITEM MESSAGE

See the picture

Attached is the source code of the test example

I need MOTION to work with PUSHBUTTON and PUSHBUTTONXP

Re: eXpress++ DCMESSAGEBOX MOTION

Posted: Sat Nov 05, 2022 12:38 pm
by rdonnay
This is a kludgy workaround but it works:

Code: Select all

bMotion := {|a,b,o,c|o:enter := {||oMsgBox:childList()[1]:setCaption(c)}, ;
                     o:leave := {||oMsgBox:childList()[1]:setCaption('')}}

@ xx,5 ;
DCPUSHBUTTON CAPTION "Action 1" SIZE 20,3 FONT "10.Consolas Bold" CURSOR aCur ;
             EVAL {|o|Eval(bMotion,nil,nil,o,"- Description: Action 1")}

@ xx,5+20.5 ;
DCPUSHBUTTON CAPTION "Action 2" SIZE 20,3 FONT "10.Consolas Bold" CURSOR aCur ;
             EVAL {|o|Eval(bMotion,nil,nil,o,"- Description: Action 2")}

@ xx,5+20.5+20.5;
DCPUSHBUTTON CAPTION "Action 3" SIZE 20,3 FONT "10.Consolas Bold" CURSOR aCur ;
             EVAL {|o|Eval(bMotion,nil,nil,o,"- Description: Action 3")}

//-  3
xx:=xx+3+0.5
@ xx,5 ;
DCPUSHBUTTONXP CAPTION "Option 1" SIZE 20,3 FONT "10.Consolas Bold" CURSOR aCur ;
             EVAL {|o|Eval(bMotion,nil,nil,o,"- Description: Action 1")}

@ xx,5+20.5 ;
DCPUSHBUTTONXP CAPTION "Option 2" SIZE 20,3 FONT "10.Consolas Bold" CURSOR aCur ;
             EVAL {|o|Eval(bMotion,nil,nil,o,"- Description: Action 2")}

@ xx,5+20.5+20.5;
DCPUSHBUTTONXP CAPTION "Option 3" SIZE 20,3 FONT "10.Consolas Bold" CURSOR aCur ;
             EVAL {|o|Eval(bMotion,nil,nil,o,"- Description: Action 3")}

Re: eXpress++ DCMESSAGEBOX MOTION

Posted: Mon Nov 07, 2022 8:43 am
by slobodan1949
Yes, the code is a bit more complex, but everything works great. And that was necessary.
Thank you very much Roger!