BBC BASIC for Windows
Programming >> User Interface >> Sizing the root window
http://bb4w.conforums.com/index.cgi?board=ui&action=display&num=1399924825

Sizing the root window
Post by g3nrw on May 12th, 2014, 8:00pm

I have been writing an app that follows the model in the example program DLGDEMO.BBC, creating a child window based on:

dlg%=FN_newdialog("Dialogue box", 20, 20, 160, 128, 8, 560)

To accommodate all the controls, I have had to increase the size parameter from 560 to 6000.

Everything works fine.

I now want to run the application in the root window, without creating a child, but when it starts it complains there is not enough room to display the dialog box. How do I supply a size parameter to the root window to make it large enough?

--
Ian

Re: Sizing the root window
Post by rtr on May 12th, 2014, 8:14pm

on May 12th, 2014, 8:00pm, g3nrw wrote:
I now want to run the application in the root window, without creating a child

Why? Dialogue boxes provide facilities that the mainwin doesn't, notably the ability to navigate from one control to another using Tab (forwards) or Shift+Tab (backwards) and support for a 'default' pushbutton. Losing those facilities is a high price to pay.

Could you not achieve the effect you want by keeping the dialogue box, but 'docking' it to the mainwin as described in the documentation here:

http://www.bbcbasic.co.uk/bbcwin/manual/bbcwini.html#hint14

Richard.
Re: Sizing the root window
Post by g3nrw on May 12th, 2014, 9:03pm

on May 12th, 2014, 8:14pm, Richard Russell wrote:
Could you not achieve the effect you want by keeping the dialogue box, but 'docking' it to the mainwin as described in the documentation here:

http://www.bbcbasic.co.uk/bbcwin/manual/bbcwini.html#hint14

Richard.


Just the job. I had overlooked the Hints section of the documentation.

I've said this before, and I'm sure I'll say it again: the more I learn about BBC Basic, the more I like it. Thanks Richard.

--
Ian