Bringing a Dialog Box to the front (in a trigger)

Hello Dxl Community

I have a trigger which launches a DB for attribute editing. The problem is, it keeps hiding behind the Module Window, when the trigger event occurs. I can make a simple InfoBox or Warning Box stay in front of the Module Window when writing triggers. However an application with DB/DBE objects keeps jumping behind.  I cannot find a command/parameter combination that forces it to stay in front. Has anyone had this type of problem?

Perhaps there is something about the trigger mechanism that causes this. I am at home now, without access to DOORS , but I am quite sure the same code in normal dxl application (non-trigger)  program does not cause it to go behind.

best regards

Colm


MyDeveloerWorks - Tue Mar 11 17:41:26 EDT 2014

Re: Bringing a Dialog Box to the front (in a trigger)
Adamarla - Wed Mar 12 10:27:55 EDT 2014

When you create a DB, you may pass an optional parent argument. It can be a module or another DB. If you do not pass a parent, the DOORS Explorer window is used.

My guess is you are not setting the module as the db parent.

-Adam

Re: Bringing a Dialog Box to the front (in a trigger)
7XUT_Antonio_Norkus - Wed Mar 12 10:51:12 EDT 2014

you can specify that a DB should stay in front of all other windows, by using the "Floating" style, e.g.

DB db = create("Title", styleFloating)

Here are the DB styles, that you can OR together:

styleStandard  - Appears like other Rational DOORS windows. 
styleFixed  - Has no resizing capability. 
styleCentered  - Appears in the center of the screen. 
styleCentred  - Appears in the center of the screen. 
styleFloating  - Appears above all other Rational DOORS windows. 
styleNoBorder - Has no title bar or resizing capability. 
styleThemed - Inherits themed styles into tabs 
styleAutoParent - Automatically set the parenting of controls based on layout information 

e.g.

DB db = create("Title", styleFixed|styleCentred|styleFloating)

Re: Bringing a Dialog Box to the front (in a trigger)
llandale - Wed Mar 12 14:30:42 EDT 2014

  • bringToFront(dbMyDialog)

My memory is that the "parent" Box is the one that gets the focus when the child is closed.  Also, the child is initially displayed relative to the parent (on-top) rather than relative to the screen.  I don't think it demands display precedence; you can certainly select the parent (from the task bar) and deal with it; child now being behind.

-Louie