Hi, If you want to have the dialog with the button "yes" set by default, then add the line: md1.DefaultResponse = Gtk.ResponseType.Yes;
Before the md1.Run() line. Also, remove the md1.Show() line, you don't need that. -- Baltasar El lun., 30 ene. 2017 a las 20:58, salvadorRenato (<[email protected]>) escribió: > hi, > > I am creating a messagedialog with button type yesNo > But it starts as the button in the selected, I would like to put the button > yes set focus default. > > How can this be done? > > Example code > > MessageDialog md1 = new MessageDialog (null, DialogFlags.Modal, > MessageType.Info, ButtonsType.YesNo,"Registrar Item? "); > > ResponseType response = (ResponseType)md1.Run (); > > md1.Show (); > > if (response == ResponseType.No) { > md1.Destroy (); > else > ...... > > > > > -- > View this message in context: > http://mono.1490590.n4.nabble.com/gtk-message-dialog-yes-no-set-focus-button-yes-monodevelop-tp4669869.html > Sent from the Mono - Gtk# mailing list archive at Nabble.com. > _______________________________________________ > Gtk-sharp-list maillist - [email protected] > http://lists.dot.net/mailman/listinfo/gtk-sharp-list >
_______________________________________________ Gtk-sharp-list maillist - [email protected] http://lists.dot.net/mailman/listinfo/gtk-sharp-list
