DO12 - Msg object for buttons

It would be useful if the Msg object for a dialog button could return the current button text (e.g. Yes, No, Quit, Whatever..) as a property. Msg.value is the obvious candidate. Currently it returns "" for a button. On the same subject, the ability to highlight button text and apply colour to a button would be nice.

Regards, AB

What would you use this for, out of interest? The button can already be identified in the Msg object by its name, and if you want the label you can get it using the Control object.

It's probably a case of not understanding or not following instructions correctly on my behalf. This code..

msg = dlg.getmsg(); ctl = msg.control; // Establish which control is "live" DOpus.output("control = " + ctl); DOpus.output("control text = " + ctl.GetText);
..produces:

control = button1
control text = undefined

The button text is always undefined.

Regards, AB

msg.control is a string, you need to use it to lookup the control object in the dialog:

DOpus.Output("control text = " + dlg.Control(msg.control).GetText);