Skip to content

Rants of a Mad Programmer

Code, Code, CODE! All I see is CODE!

  • CMHC/MIS Stuff
    • How To Bring Back the Right Click Menus in BUI
    • How To Maximize the BUI Work Area
    • MainTree uScript Shared Libraries
    • UltraEdit uScript Wordfile
    • Universal Executor
  • Pictures
    • New Years 2005
    • Spokane

How To Maximize the BUI Work Area

When designing a BUI screen, we all have to deal with the menu on the left hand side of the screen and sometimes the banner on the top of the screen as well when designing forms.

As you know the frames for these items are adjustable by hand and can be maximized by clicking the maximize work area button in the lower right hand corner of the screen.

Maximize Work Area
Button Before Click
Maximize Work Area
Button After Click

But some of us would like to be able to maximize the work area from the start of a script to get the extra screen area for our forms.  There are actually a couple of ways to do this but only one will do it where it will return to normal when your script complete like clicking the button does.

Just to touch on the other ways real quick, they involve using javascript to resize the frames via code.  This method works, but it doesn’t snap back when the script ends.

The method that is documented below actually simulates a click to the Maximize Work Area button so that when your script ends the display snaps back.

Here is the code for the function:

[sourcecode language=”plain”]
function maxdisplay() is null
$ctag(““)
end maxdisplay[/sourcecode]

Here’s a explanation of what’s going on.  With the ‘if’ statement, we are checking to see if the screen is currently maximized.  If it isn’t, we click it; if not, then we do nothing.  This code can be called by every form in your script and will only maximize and never restore.

To use this code, you just add it after your $form() statement as below:
[sourcecode language=”plain”]$form()

maxdisplay()

…FORM CODE…
$sendform()[/sourcecode]

and here’s the result:

Before maxdisplay() After maxdisplay()

Leave a Reply

You must be logged in to post a comment.

Friends

  • Michelle Smith

Programming

  • MSDN
  • pinvoke.net
  • VBNet

Work

  • MainTree Systems
  • Netsmart Technologies

Categories

Proudly powered by WordPress | Theme: micro, developed by DevriX.