Keeping DC_Popcalc() Always On Top

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
GeneB
Posts: 158
Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:

Keeping DC_Popcalc() Always On Top

#1 Post by GeneB »

Could someone please tell me how to keep the popup DC_Popcalc() always on top?
I would assume that would also be the way to keep a DCFINDBROWSE window always on top?

Thanks.
GeneB

User avatar
rdonnay
Site Admin
Posts: 4733
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Keeping DC_Popcalc() Always On Top

#2 Post by rdonnay »

I am assuming you mean that you want it to be MODAL.

In order for modality to work, it needs to have an owner.
By default, the owner is SetAppWindow().

Whenever you are using a popup, you should make sure that the calling window is the SetAppWindow().

Look at the below example:

Code: Select all

#INCLUDE "dcdialog.ch"

FUNCTION Main()

LOCAL GetList[0], n := 123.45

@ 0,0 DCSAY 'Enter a number' GET n ;
      POPUP {|n|DC_Popcalc(n)} ;
      SAYSIZE 0 SAYBOTTOM

DCREAD GUI FIT TITLE 'Pop Calc test' SETAPPWINDOW

RETURN nil

PROC appsys ; return
The eXpress train is coming - and it has more cars.

User avatar
GeneB
Posts: 158
Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:

Re: Keeping DC_Popcalc() Always On Top

#3 Post by GeneB »

SETAPPWINDOW in the parameters of Main() solved it.

Muchisimas gracias.
GeneB

Post Reply