Window Management in GUI

Syed

New Member
Hi everybody,
Hope any one could help me out with this.
I have a master window with pushbuttons. The requirment is, if
the user presses any pushbutton a new window should come up and the main window should be disabled and minimized, ie the user should not use anymore pushbuttons in the main window. I have tried using window-state attribute which minimizes but it does not get disabled.
Has anybody got a better idea? Thanks in advance.
 
Syed,

I'm not a GUI programmer so there may be a neater GUI solution but why not disable the buttons as soon as one of them is pressed and only re-enable them on return from the called window?
 
Simply disable the frame before the run statement under your button and enable it again afterwards. This is what i do, and it works fine.

<pre>
ASSIGN FRAME {&FRAME-NAME}:SENSITIVE = NO.
RUN other-window.w.
ASSIGN FRAME {&FRAME-NAME}:SENSITIVE = YES.
</pre>
 
Syed,

You can also just set the main window's "SENSITIVE" attribute to FALSE after you minimize it with WINDOW-STATE, OR, possibly even better, just make the whole window HIDDEN without having to set WINDOW-STATE, which makes it impossible to use any objects/widgets in it (of course set HIDDEN to FALSE when the procedure returns).

BUT:
My question to you is, why do you need this functionality?
The good thing about GUI is that you can have multiple windows open (and use these) at any one time. If your logic is OK and transactions are small (only lock records and start a transaction when an actual add, save or delete takes place in the database and make it last just long enough for that), this should not be a problem...
Again, I do not know what it is you are doing inside your windows and why you need this functionality, hence my question (I am always eager to learn from what others are doing/encounter).
 
did it work?

did it work?

you can also use
"
disable all [except ....] with frame {&frame-name} .
run ....
enable all [except ....] with frame {&frame-name} .
"
 
I think you are going about this in the wrong way.

When you press a button on the main window the new window you popup should be a dialog box which is modal.

This saves you from doing weird actions on the main window.

Look at how other GUI apps work.
 
Chris,

It all depends on what you want to do (or need to do)... hence my question "why do you need this kind of functionality". Building a UI with a main window and heaps of dialog boxes is not exactly User Friendly. Other GUI Apps (at least the ones I know & use) hardly ever use Dialog Boxes.
 
True.

Our app uses windows to update data. We only start and commit a transaction when the user presses the okay button.

However with this method you do need to think about how you are doing your locking.

Most people (especially N-tier) do optimistic locking - which is horrible.

In our app we doing pessimistic locking, which is still possible with windows but not possible (I believe) with N-tier.
 
Gui

I am a GUI developer and am slightly puzzled. Think UI, then define what you require. This brings 1 point, WHY do you need a container-source? Obv you need the first UI in a window (container-source) but why are you then wishing to hide the buttons to stop GUI functionality. Just simply drop the required UI into a frame. Have multiple frames in the container-source (window) and MOVE-TO-TOP() the required frame when needed. Making all the other frames HIDDEN when not needed, just VIEW them when you require them in the UI.
 
Back
Top