MessageBox Ver. 2.0.10027

MessageBox Ver. 2.0.10027

kandennti
Mentor Mentor
1,103 Views
6 Replies
Message 1 of 7

MessageBox Ver. 2.0.10027

kandennti
Mentor
Mentor

Hi everyone.

 

It seems that UserInterface.messageBox has been changed since Ver 2.0.10027.
I cannot drag the displayed MessageBox with the mouse, is this a specification?

 

It used to be possible to drag them.
It is operated at 0:08-0:09.

 

Accepted solutions (1)
1,104 Views
6 Replies
Replies (6)
Message 2 of 7

JeromeBriot
Mentor
Mentor

Hi,

 

I confirm that the messageBox object change and is no more movable:

 

ui.messageBox('test', 'Test Message box')

 

messageBox.PNG

Message 3 of 7

goyals
Autodesk
Autodesk
Accepted solution

It is as per specification at the moment. We are trying to make message box in Fusion more HIG compliant. There will be more changes to the styling of this dialog in next Fusion update. Thanks.



Shyam Goyal
Sr. Software Dev. Manager
Message 4 of 7

kandennti
Mentor
Mentor

Thank you, @goyals .

 

Yes, sir. I'm looking forward to it.

If I really need the old style, I will use this.

def run(context):
    ui :adsk.core.UserInterface = None
    try:
        app :adsk.core.Application = adsk.core.Application.get()
        ui = app.userInterface

        msg = 'New Style'
        ui.messageBox(msg)

        msg = 'Old Style'
        app.executeTextCommand(f'UI.SimpleMessageBox "{msg}"')
        
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
Message 5 of 7

kandennti
Mentor
Mentor

We have confirmed that Ver 2.0.10244 fixed the problem so that you can move it by dragging.
Thanks!

Message 6 of 7

JeromeBriot
Mentor
Mentor

Did you notice that you can now select text and copy/paste it using the right mouse button or keyboard shortcuts?

 

messageBox-copy-paste.PNG

Thanks to whoever implemented this.

 

 

 

Message 7 of 7

nnikbin
Collaborator
Collaborator

Like the pre-modernized version, the new message box is able to show basic html formatting (an undocumented feature).

 

Running @JeromeBriot 's code from this post results the following message box.

 

45.png

And by copyig the html formatted text, you can paste it as formatted text, for example in a google docs document.

 

46.png