FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How refresh a dialog ?
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
How refresh a dialog ?
Posted: Tue Mar 18, 2008 01: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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How refresh a dialog ?
Posted: Tue Mar 18, 2008 02:15 PM

oDlg:End()

and then

DEFINE DIALOG oDlg...

EMG

Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
How refresh a dialog ?
Posted: Tue Mar 18, 2008 02: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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
How refresh a dialog ?
Posted: Tue Mar 18, 2008 03: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
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
How refresh a dialog ?
Posted: Wed Mar 19, 2008 01:43 AM
I've used multilanguage menu and change on the fly.
You must end menu and rebuild it again.

Regards,
Dutch

   MEMVAR->Lang := cLang
   oMenu:End()
   BuildMenu( oWnd )
   oWnd:SetMenu( oMenu )
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
How refresh a dialog ?
Posted: Wed Mar 19, 2008 08: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

Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
How refresh a dialog ?
Posted: Wed Mar 19, 2008 08:48 AM

THansk Emg
I sent to Antonio the new msgcalc()

Best Regards, Saludos



Falconi Silvio
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
How refresh a dialog ?
Posted: Wed Mar 19, 2008 07:24 PM
Silvio,

Why don't you use some code like this :

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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
How refresh a dialog ?
Posted: Wed Mar 19, 2008 07: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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
How refresh a dialog ?
Posted: Thu Mar 20, 2008 08: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

Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
How refresh a dialog ?
Posted: Thu Mar 20, 2008 01: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
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
How refresh a dialog ?
Posted: 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How refresh a dialog ?
Posted: Fri Mar 21, 2008 03: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
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
How refresh a dialog ?
Posted: Fri Mar 21, 2008 05: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How refresh a dialog ?
Posted: Fri Mar 21, 2008 08: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