how to minimize a dialog which comes from a menu item.

qnx 6.3.0
I have created a Gui program. A Main window has a menu. when you choose a menu item, a dialog comes out. but this dialg can be maximized,closed, but can’t be minimized. The Main windows can be maximized,closed,minimized.
I have tried some properties,such as Flags:Render,Flags:Managed,Flags:Notify , but still can’t minimize this dialog.

Any advice will be appreciated. 3x

I don’t recall the exact details, but this may be a “feature” of the dialog widget. My guess is that only “windows” have all the equipment to be minimized. This might not be so bad. You can probably turn off stuff on a window so that it looks like a dialog.

Thanks,maschoen.
I have created my program like this, if now I change dialog to window, maybe it is not very convenient. is there a better solution for it ? Thanks

And dialog has minimized button on the top-right. if it can’t be minimized, why does it still have minimized button.

You got me curious when you pointed out the minimize button on the Dialog, so I took a closer look. I have to change my answer a bit, but I think the result is the same or worse. I don’t think that by starting over an creating a Window, you will solve the problem. It turns out a Dialog uses the same widget at as windows, a ptWindow. So as a widget, a Dialog has exactly the same equipment as a Window. That explains the minimize button. If you look at its resources, you can remove the minimize button by modifying the “render” resource. I don’t know why this isn’t done by default, it seems to be a small oversite.

That said, something more complicated is going on. I think it’s best understood by slaying the window manager, an actual process that is an optional part of Photon. The Photon kernel doesn’t really know about windows, it knows about regions. Regions don’t move around by themselves. It would be tedious and difficult for each application to be responsible for dealing with moving a window around, resizing it, and minimizing/maximizing it. So instead, the window manager process does most of the work for you.

I believe that when you click on one of the window buttons, you are just activating an event (a window manager event), which the window manager responds to. Evidently it only responds to the minimize event when it comes from the primary window of an application, not a dialog.
You may have noticed that minimzing the main window will also minimize all dialogs.

Is it possible to modify this behavior, make it so that Windows and Dialogs are minimized separately? Maybe? You will have to study the window manager interface to find out. There is a whole section in the on-line documentation: Photon Micro Gui/Programmer’s Guide/Window Management.

I haven’t done much in this area, and none since Photon 2.0, but I’d be interested to learn what you find out.

Thanks very much for your answear, Maybe it’s difficult to do that, Now I just want to put down it for a period of time. if it’s possible, I will try it .

Well if you do learn about this interface, you will probably be the expert outside (and maybe even inside) of QSSL. Then you can answer all our questions on this matter. :slight_smile:.

hehe, I don’t think I can , but I will try to learn little about it . do you work in QSSL? haha

I have solved , there is a down-oriented arrow on the left up.

Please tell us more. Do you have a way to minimize just a dialog? Are there two places on the bar at the bottom of the screen?

there is a down-oriented arrow on the left up of the dialog , click it you can pull up the dialog, then the arrow becomes right-oriented arrow. if click it again , you can pull down the dialog. and the arrow becomes down-oriented arrow. I think it’s good. It isn’t necessary to minimize it on the bar at the bottom of the screen.