dc_working and modal

This forum is for eXpress++ general support.
Post Reply
Message
Author
skiman
Posts: 1206
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

dc_working and modal

#1 Post by skiman »

Hi,

I need a modal dialog with a button on it to cancel. I thought dc_working would fullfill this need.
However it seems as with dc_working a user can click on another part of the screen and the dc_working dialog goes into the background.

I changed the behaviour so with each dc_working(1) to update the dialog there is a oDlg:tofront() executed. This way the dc_working dialog displays again after each refresh.

Code: Select all

...
      IF DC_LangSet() == DCLANG_CHINESE .OR. .t.
        oDlg:cargo:SetCaption(Repl('||',nWORK_CURRCOL-nWORK_STCOL))
      ELSE
        oDlg:cargo:SetCaption(Repl(Chr(31)+Chr(31),nWORK_CURRCOL-nWORK_STCOL))
      ENDIF
     oDlg:tofront()   <<<<<<<--------------------- new line added, brings it to front.
      IF Valtype(aWORK_CANCEL) = 'L'
         DO WHILE nEvent # xbeP_None .AND. nEvent # 0
            nEvent := AppEvent( @mp1, @mp2, @oXbp, .01 )
            IF Valtype(oXbp) = 'O'
   ...
Best regards,

Chris.
www.aboservice.be

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

Re: dc_working and modal

#2 Post by rdonnay »

Thanks Chris.

I just added it to my source.
The eXpress train is coming - and it has more cars.

Post Reply