Page 1 of 1

Msgbox positioning

Posted: Tue Jul 20, 2010 3:17 pm
by Susan Smith
Does anyone know if there is a setting to change the default position of msgboxes in BR? They appear in the center of the physical screen (and always have as far as I know), but with the prevalence of widescreen monitors, it's possible that the msgbox may not even appear over your BR screen if it's not sized large enough. If you have a lot of other things open on the screen, it's not clear that it is related to the BR window.

I would like to be able to center it over the BR window instead of the physical monitor space. Is that possible? I am using BR 4.2

-- Susan

Posted: Tue Jul 20, 2010 4:08 pm
by gtisdale
No

FNGeorge

If you really need to center over your BR window FNWAITWIN in FNSNAP will allow you to do that, but the user has to actually use the mouse to click a button, rather than hit Y or N (The options in WAITWIN can be anything you want)

Also, David Blankenship produced a dialog box in Delphi that can be used and positioned relative to the desktop, not BR.

Posted: Tue Jul 20, 2010 4:17 pm
by Susan Smith
Thanks George. It's great to have options, isn't it? This was really a little quick and dirty routine that I don't have much time to spend on. I do use David's routine quite often in other places (one of the benefits of it is that you can specify what you want your buttons to say, which is a REALLY nice feature). But in testing something ELSE in this program (with my new widescreen monitor), I just happened to notice that the msgbox was way off to the right of the program window.

I'll determine whether or not it's worth spending more time on to get it to look "perfect" in the time I have left on it.

Thanks again.

-- Susan

Posted: Tue Sep 21, 2010 8:39 am
by John
Can the MsgBox ( http://brwiki.ads.net/index.php?title=Msgbox ) internal function not do: Abort, Retry, Ignore ?

The documentation seems to suggest it doesn't support this button set. But it also seems like an oversight. Has anyone used an "Abort, Retry, Ignore" button set with MsgBox? And if so, could you provide me a little example? If I can get it to work, I'll update the documentation to show how.

-John Bowman

Posted: Tue Sep 21, 2010 9:35 am
by Susan Smith
John,

I use msgbox quite a bit and as far as I know, it has never supported any buttons other than OK,Yes, No and Cancel (I would love a "Continue" button!). This limitation appears to be because the only return values are 1,2,3 or 4- corresponding to those buttons. In my opinion, this is where the usefulness of the feature hits a dead end. If you could simply pass back the element # or subscript in your button array (or 0 for no selection) without having it be tied to a "hard-coded" button, and pass IN a list of button captions (and an icon path/filename, then you could create your own customized msgbox. For instance:

The buttons you want are "Abort","Retry","Ignore". The icon you want to display is a big red "no sign" like the circle with a slash through it. You msgbox call could be:

let result=msgbox("message text","msbox caption","ABORT;RETRY;IGNORE",c:\images\no.png"

if result was 3, then it means you clicked the ignore button. If it was 1, then you clicked on Abort, etc.

How wonderful would THAT be!?

I'm sure the buttons would have to be subject to some limit on length. And since the result would no longer be hard-coded to match certain buttons, you'd have a LOT of flexibility.

Unfortunately, we don't live in that world ;)

So when I need other buttons, I use David Blankenship's "Radiochk" program which DOES allow you to create your own buttons AND they can be buttons, check boxes or radio buttons just by altering one switch on the system call! The only drawback is that since it isn't an internal BR feature, it communicates back to you in a text file, so you have one additional step - to read the file to obtain the result. But it has a lot of other features as well. I'm just responding to your inquiry about an "Abort, Retry, Ignore" button set. Bottom line? It doesn't exist in msgbox.

-- Susan

Posted: Tue Sep 21, 2010 9:36 am
by Susan Smith
Adding on to my last message...

I would also love to see msgbox have an optional parameter of "seconds" where you could display a message WITHOUT buttons for X seconds.

-- Susan

Posted: Tue Sep 21, 2010 12:32 pm
by Gabriel
You can make a function that opens a "Parent=None" window and makes a custom message box window. You can then make it work however you want and using it is as convenient as using the BR MSGBOX function.

I use ScreenIO so it took me less then 10 minutes to make my own custom Messagebox function, and I use it all over the place now.

But even without ScreenIO it shouldn't take more then an hour or two.

Gabriel