eXpress++ DCMESSAGEBOX MOTION

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
slobodan1949
Posts: 80
Joined: Mon Apr 25, 2011 8:57 am
Location: SERBIA
Contact:

eXpress++ DCMESSAGEBOX MOTION

#1 Post 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
Attachments
TEST.zip
(9.79 KiB) Downloaded 130 times
DCMESSAGEBOX_MOTION.png
DCMESSAGEBOX_MOTION.png (8.72 KiB) Viewed 1905 times

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: eXpress++ DCMESSAGEBOX MOTION

#2 Post 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")}
The eXpress train is coming - and it has more cars.

User avatar
slobodan1949
Posts: 80
Joined: Mon Apr 25, 2011 8:57 am
Location: SERBIA
Contact:

Re: eXpress++ DCMESSAGEBOX MOTION

#3 Post by slobodan1949 »

Yes, the code is a bit more complex, but everything works great. And that was necessary.
Thank you very much Roger!

Post Reply