Dialog don't behave like a dialog

Dialog don't behave like a dialog

Postby JoaquimC » Sat Feb 10, 2007 11:14 pm

I have a form, and on that form i call a dialog.
But if i click on the form, the dialog goes back of the original form, unlike a dialog should act.

The code for the dialogue is:
Code: Select all  Expand view  RUN
    DEFINE dialog oDlg title titulo size 237,268
   @ 02, 03 GET oNome_servico var _nome_servico SIZE 65, 10 PIXEL READONLY FONT oFont
   @ 02, 70 GET oData var _data SIZE 45, 10 PIXEL READONLY FONT oFont
   @ 13, 03 GET oNome_quarto var _nome_quarto SIZE 65, 10 PIXEL READONLY FONT oFont
   @ 13, 70 GET oNome_refeicao var _nome_refeicao SIZE 45, 10 PIXEL READONLY FONT oFont   
   @ 24, 03 GET oNome_cama var _nome_cama SIZE 65, 10 PIXEL READONLY FONT oFont

   @ 38, 03 say "Qtd: " size 45, 10 pixel
   @ 38, 33 GET oQtd var _qtd SIZE 65, 10 PIXEL FONT oFont

   
   @ 110, 23 button "&Gravar" size 35, 20 PIXEL action m_detalhe_gravar(oDlg, estado)
   @ 110, 63 button "&Cancelar" size 35, 20 PIXEL action m_detalhe_cancelar(oDlg, estado)

      ACTIVATE dialog oDlg


What am i doing wrong?

TIA,
Joaquim
JoaquimC
 
Posts: 16
Joined: Fri Feb 09, 2007 6:43 pm
Location: Porto - Portugal

Postby Antonio Linares » Sat Feb 10, 2007 11:25 pm

Joaquim,

Define the dialog this way:

DEFINE dialog oDlg title titulo size 237,268 OF oWnd

where oWnd is the previous window or dialog
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42112
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby JoaquimC » Sun Feb 11, 2007 1:13 am

Antonio,

Thank you for answering so fast, but it didn't solve the problem.
When i select the back form it still gets in front of the dialog and i don't see the dialog anymore.

Joaquim
JoaquimC
 
Posts: 16
Joined: Fri Feb 09, 2007 6:43 pm
Location: Porto - Portugal

Postby Antonio Linares » Sun Feb 11, 2007 7:07 am

Joaquim,

Here you have a working sample:
Code: Select all  Expand view  RUN
#include "FWCE.ch"

function Main()

   local oWnd
   
   DEFINE WINDOW oWnd TITLE "Main"
   
   @ 9, 2 BUTTON "Dialog" ;
      SIZE 210, 30 ACTION BuildDlg( oWnd )

   ACTIVATE WINDOW oWnd
   
return nil   

function BuildDlg( oWnd )

   local oDlg
   
   DEFINE DIALOG oDlg TITLE "Test" ;
      SIZE 200, 80 OF oWnd
   
   ACTIVATE DIALOG oDlg ;
      ON CLICK MsgInfo( "dialog click!" )
   
return nil   
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42112
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby JoaquimC » Sun Feb 11, 2007 6:28 pm

Thank you Antonio: problem solved...
Joaquim
JoaquimC
 
Posts: 16
Joined: Fri Feb 09, 2007 6:43 pm
Location: Porto - Portugal


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 34 guests