how to switch from modal dialog to non modal?

how to switch from modal dialog to non modal?

Postby ShumingWang » Sat Dec 03, 2011 8: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
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Re: how to switch from modal dialog to non modal?

Postby Antonio Linares » Sat Dec 03, 2011 9:32 am

Shuming,

This example may help you:

modalno.prg
Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42084
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: how to switch from modal dialog to non modal?

Postby ShumingWang » 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
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 113 guests