FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Modal and no Modal Dialogs
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Modal and no Modal Dialogs
Posted: Tue Aug 09, 2016 03: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 (fw): Select all Collapse
#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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Modal and no Modal Dialogs
Posted: Tue Aug 09, 2016 05: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

Continue the discussion