PowerBuilder: Transparent MDI Frame

Posted on Friday, August 6th, 2010 at 8:40 pm in

I’m working on an MDI application which uses an mdi frame (naturally) with a sheet (window type: Main!) which normally covers the entire working area of the frame. This window serves as a large ‘sitemap’ of the over all application. One of the windows of the application displays time sensitive data (could be orders, deliveries, parts in production, whatever) and is also window type Main! but is not opened as a sheet. This means it is not confined to the interior area of the MDI frame.

The end users normally use this ‘monitor’ window to alert them of issues with any of the items on the display. If desired they can open up a detail window on any of the items to see and/or modify information on that specific thing. This detail screen is a Response window.

A problem arises when the end user does the following: Open application, open monitor window, minimize monitor window, minimize application window, maximize monitor window (at this point we have the monitor window displayed with the underlying application window minimized). Open the detail window of an item on the monitor. At this point the application window maximizes itself and the detail window is displayed on top of it (so now the monitor is ‘in the back’ so to speak and hidden). The desired functionality is that the detail window appear on top of the monitor window.

To work around this PowerBuilder ‘feature’ I implemented the following in the event which opens the detail window:

boolean lb_max

// The system must maximize the frame before opening a popup window from a Main window type
if g_pfapp.mdiframe.WindowState = Minimized! then
	lb_max = TRUE
	g_app.mdiframe.transparency = 100 // totally transparent
	g_app.mdiframe.WindowState = Maximized! 
end if
// bring up the details response window on top of the now invisible mdi frame
openwithparm(w_details, this)
IF lb_max THEN
	g_app.mdiframe.WindowState = Minimized!
	g_app.mdiframe.transparency = 0 // opaque again
END IF

The g_app in the example is a PFC based application object.

You might also be interested in

Top