FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC Dialog don't behave like a dialog
Posts: 16
Joined: Fri Feb 09, 2007 06:43 PM
Dialog don't behave like a dialog
Posted: 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:
    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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Dialog don't behave like a dialog
Posted: 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
Posts: 16
Joined: Fri Feb 09, 2007 06:43 PM
Dialog don't behave like a dialog
Posted: Sun Feb 11, 2007 01: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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Dialog don't behave like a dialog
Posted: Sun Feb 11, 2007 07:07 AM
Joaquim,

Here you have a working sample:
#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
Posts: 16
Joined: Fri Feb 09, 2007 06:43 PM
Dialog don't behave like a dialog
Posted: Sun Feb 11, 2007 06:28 PM

Thank you Antonio: problem solved...
Joaquim

Continue the discussion