FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour how to switch from modal dialog to non modal?
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
how to switch from modal dialog to non modal?
Posted: Sat Dec 03, 2011 08:26 AM

Hi, How to switch from modal dialog to non modal dialog and form non modal to modal dialog ?
TKS!
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: how to switch from modal dialog to non modal?
Posted: Sat Dec 03, 2011 09:32 AM
Shuming,

This example may help you:

modalno.prg
Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   local oWnd

   DEFINE WINDOW oWnd

   ACTIVATE WINDOW oWnd ;
      ON INIT BuildDlg( oWnd )

return nil

function BuildDlg( oWnd )

   local oDlg, oBtn, lNonModal := .F.

   DEFINE DIALOG oDlg TITLE "Modal"
   
   @ 2, 2 BUTTON oBtn PROMPT "As Non Modal" ;
      ACTION ( lNonModal := .T., oDlg:End() )

   ACTIVATE DIALOG oDlg CENTERED

   if lNonModal
      oDlg:SetText( "Non modal" )
      oBtn:SetText( "End" )
      oBtn:bAction = { || oDlg:End() }

      ACTIVATE DIALOG oDlg NOWAIT CENTERED
      
      oDlg:Show()
   endif

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Re: how to switch from modal dialog to non modal?
Posted: Sat Dec 03, 2011 11:54 AM

Thank you very much!
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651

Continue the discussion