How refresh a dialog ?

How refresh a dialog ?

Postby Silvio » Tue Mar 18, 2008 1:18 pm

I load a dialog
in this dialog I have a MENU pulldown where I can set a logic variable

before of this dialog thereis the variable lSmall

If lsmall
DIALOG
endif

IF Lbig
DIALOG
endif

ACTIVATE

If change the value of this logic variable How I can make to reload my application and reload the dialog ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: How refresh a dialog ?

Postby Enrico Maria Giordano » Tue Mar 18, 2008 2:15 pm

oDlg:End()

and then

DEFINE DIALOG oDlg...

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8716
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Silvio » Tue Mar 18, 2008 2:53 pm

perhaps you not understand me

I made a menu
...
menuitem " scentific" action ( lstandard:=.f.,oDlg:refresh())
....
endmenu
where I must insert the command odlg:end() and define dialog ... ?

For me this is very difficult to understand...Perhaps it is time: here is rain
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Enrico Maria Giordano » Tue Mar 18, 2008 3:01 pm

You have to End() the current dialog and call the function that created it, the one with

If lsmall
DIALOG
endif

IF Lbig
DIALOG
endif

ACTIVATE


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8716
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby dutch » Wed Mar 19, 2008 1:43 am

I've used multilanguage menu and change on the fly.
You must end menu and rebuild it again.

Regards,
Dutch

Code: Select all  Expand view  RUN
   MEMVAR->Lang := cLang
   oMenu:End()
   BuildMenu( oWnd )
   oWnd:SetMenu( oMenu )
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Postby Enrico Maria Giordano » Wed Mar 19, 2008 8:08 am

It seems that Silvio wants to modify the entire dialog. If that is true, it is easier to design a new dialog and alternatively End() the current and DEFINE the new.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8716
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Silvio » Wed Mar 19, 2008 8:48 am

THansk Emg
I sent to Antonio the new msgcalc()
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby driessen » Wed Mar 19, 2008 7:24 pm

Silvio,

Why don't you use some code like this :

Code: Select all  Expand view  RUN
LOCAL cRet := .T.
LOCAL cCheck := .F.

DO WHILE cRet

   IF cCheck
      DEFINE DIALOG ...
   ELSE
      DEFINE DIALOG ...
   ENDIF
   ....
   REDEFINE CHECKBOX cCheck ID ... ON CHANGE (cRet:=.T.,oDlg:End())
   ....
   REDEFINE BUTTON ... ACTION (cRet:=.F.,oDlg:End())
   ....
   ACTIVATE ....

   IF !cRet
      EXIT
   ENDIF

ENDDO


The button is, of course, the END-button.

I use it often and it works fine.

Good luck.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Silvio » Wed Mar 19, 2008 7:33 pm

NOOOOOOOOOOOOO

I want refresh the same dialog

sample :
open the WIN XP ( OR 2000) CALC.EXE

NOW YOU HAVE THE CALC STANDARD
OPEN THE SCENTIFIC CALC

i HOPE YOU UNDERSTAND ME NOW
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Enrico Maria Giordano » Thu Mar 20, 2008 8:01 am

Ok, then you have to play with Hide() and Show() methods of the controls and with the Move() method of the dialog.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8716
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby StefanHaupt » Thu Mar 20, 2008 1:42 pm

you can also use pages, one for the standard look and one for scientific look. Then you can easily change the look.
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Silvio » Fri Mar 21, 2008 11:36 am

DEAR EMG
Can you make an test small with move function please
for understand How I must make it
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Fri Mar 21, 2008 3:22 pm

Silvio,

Its the same way the folder works. It shows the active page and hides the previous one:

oDlg1:Hide(), oDlg2:Show()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Silvio » Fri Mar 21, 2008 5:44 pm

Dear Antonio,
None friend understand what I want
If you load Windows Calc you can select scentific calc or stardard calc
I have msgcal ( calc standard) and I insert on a menu pulldown a selection to change the form of the dialog

IF lStandard // active standard calc
DEFINE DIALOG oDlg SIZE 255, 245 TITLE cTitle FONT oFont ICON oIco
ELSE
DEFINE DIALOG oDlg SIZE 485, 245 TITLE cTitle FONT oFont ICON oIco
ENDIF

I want only refresh the dialog and change the form iand esecute

DEFINE DIALOG oDlg SIZE 485, 245 TITLE cTitle FONT oFont ICON oIco


if lstandard is .f.


I hope you help me
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Fri Mar 21, 2008 8:21 pm

If you just want to change its size then you can use:

oDlg:SetSize( nWidth, nHeight )

To change its title use:

oDlg:SetText( "new title" )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 81 guests