Modal and no Modal Dialogs

Modal and no Modal Dialogs

Postby Marcelo Via Giglio » Tue Aug 09, 2016 3:54 pm

Buenos días

I have the following need, to open a non-modal dialog (NOWAIT), all dialogs from there have the same behavior, what I need is that when I open a modal dialog from one no modal not let me do anything until it is closed.

I Left a code to demonstrates the behavior. By selecting the "Option 1" dialog "OPTION 1" (NO MODAL) is displayed with a button that can display the option 3 (modal), what I want is if option 3 is selected, I can not select nothing more until it is closed. I hope to be clear

Code: Select all  Expand view
#include "fivewin.ch"

function mail()
local odlg, b1, b2

   define dialog oDlg from 10,10 to 30,80 title "PRINCIPAL"
      @ 1, 5 button b1 prompt "Opción 1" of oDlg ACTION opcion1()
      @ 1,16 button b2 prompt "Opción 2" of oDlg ACTION opcion2()
   ACTIVATE DIALOG oDlg
return nil

function opcion1()
local odlg, b1

   define dialog oDlg from 20,20 to 40,40 title "OPCION 1"
      @ 1, 5 button b1 prompt "Opción 3" of oDlg ACTION opcion3()
   ACTIVATE DIALOG oDlg  NOWAIT
return nil

function opcion2()
local odlg, b1

   define dialog oDlg from 30,30 to 50,50  title "OPCION 2"
      @ 1, 5 button b1 prompt "Opción 3" of oDlg ACTION opcion3()
   ACTIVATE DIALOG oDlg
return nil

function opcion3()
local odlg, b1

   define dialog oDlg from 15,75 to 20,95 title "OPCION 3"
   ACTIVATE DIALOG oDlg

return nil
 


regards

Marcelo
Last edited by Marcelo Via Giglio on Tue Aug 09, 2016 7:24 pm, edited 2 times in total.
Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: Modal and no Modal Dialogs

Postby cnavarro » Tue Aug 09, 2016 5:58 pm

Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 86 guests