Re: Msgbox window background color
Jon Ogden <[email protected]>
| Newsgroups | gmane.comp.lang.realbasic.user |
|---|---|
| Message-ID | <[email protected]> |
It’s quite simple. Create a window that acts as your pop up. Call it MyMsgBox or whatever. Make sure it is not intrinsic. Now add a function to the window called RunDialog. Add a property to the Window called RetVal and set it to type integer or whatever you want. Here is example code for the method Public Function RunDialog(TheMessage as String) as Integer TextField1.Text = TheMessage Self.ShowModal Return RetVal End Sub So Textfield1 is on your window. RetVal is set by whatever button is pressed to close the window. You set things up like this: Dim w as New MyMsgBox Dim MyVal as Integer = w.RunDialog(“This is some Text.”) It’s that simple. Now you can make the window look however you want. Sent from my iPhone >> On Jul 23, 2017, at 4:14 PM, donJ <[email protected]> wrote: >> >>> On 07/23/2017 02:48 PM, Marnaud wrote: >>> Le 23 juil. 2017 à 21:44 du soir, Jon Ogden <[email protected]> a écrit: >>> >>> You might be able to do something more with MessageDialog. Not sure though. >> Since you can’t obtain it’s handle, I don’t think you can do much. Creating a custom one is trivial, however. >> >> >> To unsubscribe, email [email protected] > Is it trivial? > > > The msgbox() returns a value indicating which buttonwas pressed. How can I do something like: > > i = MyWindow.ShowModal > > ?? > > I suppose I could set a property on the window that called it. > > Thank you for the idea. > > Don > > > > To unsubscribe, email [email protected] > To unsubscribe, email [email protected]