I explain you
I put also word on espana language to understood the problem
On My archive I have a filed called MvTipo the value can be E or U ( Ingreso or Gastos)
If is E the user can insert Customers and category of Ingreso
If is U the user can insert Provveders and category of Gastos
in that dialog ( with combos) I wish create a research on this archive and I ask to final user
1. if he want search all moviments ( apuntes) or can select only "Entrata" (ingreso) or only "
Uscita" (gastos)
the procedure must refresh the combos
"Clienti" ( clientes) if the type of moviments( apuntes) is E (ingreso)
"Fornitori" (provveders) if the type of moviments (apuntes) is U (gastos)
and it make right ..refresh the combobox
If the final user before to press the button "confirm" wish change the first combobox ( Ingreso or Gastos) then the other comboboxes are not refresh()
I add also two combobox one for clientes and one for provveders
it run but after many times the comboboxes are not refresh or there is something of error
or I'm afraid that in the end does not work, or the final user can not figure out how to do the research
new code to try
- Code: Select all Expand view RUN
#include "FiveWin.ch"
#include "constant.ch"
Function Test()
local oDlg, aGet[40]
local lTutteOp := .t.
local aTipoOp := {"Entrate","Uscite"}
local cTipoOp := aTipoOp[1]
Local lTClienti := .t.
Local cClienti := ''
Local aClienti := {}
Local lTFornitori := .t.
Local cFornitori := ''
Local aFornitori := {}
Local lTEntrate := .t.
Local cEntrate := ''
Local aEntrate := {}
Local lTUscite := .t.
Local cUscite := ''
Local aUscite := {}
// per la dialog 1...
Local nBottom := 35
Local nRight := 57
Local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
Local nHeight := nBottom * DLG_CHARPIX_H
Local oBtnOK,oBtnCan
aClienti := {"Cliente1","Cliente2","Cliente3"}
aEntrate := {"Entrate1","Entrate2","Entrate3"}
aFornitori:= {"Provveder1","Provveder2","Provveder3"}
aUscite := {"Uscite1","Uscite2","Uscite3"}
DEFINE DIALOG oDlg ;
TITLE "Assistente alla ricerca movimenti" ;
SIZE nWidth, nHeight PIXEL
@ 60, 10 SAY "Tipo movimento" OF oDlg SIZE 55, 8 PIXEL
@ 58, 56 CHECKBOX aGet[8] VAR lTutteOp PROMPT "Tutti" SIZE 25,8 PIXEL OF oDlg
@ 60, 100 SAY "Selezionare :" OF oDlg SIZE 55, 8 PIXEL
@ 58, 145 COMBOBOX aGet[9] VAR cTipoOp ITEMS aTipoOp SIZE 75,12 PIXEL OF oDlg WHEN !lTutteOp
aGet[9]:bChange := {|| aGet[9]:oGet:Assign(), oDlg:AEvalWhen() } // <--- Add this
@ 74, 10 SAY "Pagatori" OF oDlg SIZE 55, 8 PIXEL
@ 72, 56 CHECKBOX aGet[10] VAR lTClienti PROMPT "Tutti" SIZE 25,8 PIXEL OF oDlg WHEN {|| cTipoOp==aTipoOp[1] .and. !lTutteOp}
@ 74, 100 SAY "Selezionare :" OF oDlg SIZE 55, 8 PIXEL
@ 72, 145 COMBOBOX aGet[11] VAR cClienti ITEMS aClienti SIZE 75,12 PIXEL OF oDlg WHEN {|| ! lTClienti .and. cTipoOp==aTipoOp[1] }
@ 88, 10 SAY "Causali Entrate " OF oDlg SIZE 55, 8 PIXEL
@ 86, 56 CHECKBOX aGet[12] VAR lTEntrate PROMPT "Tutti" SIZE 25,8 PIXEL OF oDlg WHEN cTipoOp==aTipoOp[1] .and. !lTutteOp
@ 88, 100 SAY "Selezionare:" OF oDlg SIZE 55, 8 PIXEL
@ 86, 145 COMBOBOX aGet[13] VAR cEntrate ITEMS aEntrate SIZE 75,12 PIXEL OF oDlg WHEN !lTEntrate .AND. cTipoOp==aTipoOp[1]
@ 102, 10 SAY "Fornitori " OF oDlg SIZE 55, 8 PIXEL
@ 100, 56 CHECKBOX aGet[14] VAR lTFornitori PROMPT "Tutti" SIZE 25,8 PIXEL OF oDlg WHEN cTipoOp==aTipoOp[2] .and. !lTutteOp
@ 102, 100 SAY "Selezionare:" OF oDlg SIZE 55, 8 PIXEL
@ 100, 145 COMBOBOX aGet[15] VAR cfornitori ITEMS aFornitori SIZE 75,12 PIXEL OF oDlg WHEN !lTFornitori .AND. cTipoOp==aTipoOp[2]
@ 116, 10 SAY "Causali Uscite " OF oDlg SIZE 55, 8 PIXEL
@ 114, 56 CHECKBOX aGet[16] VAR lTUscite PROMPT "Tutti" SIZE 25,8 PIXEL OF oDlg WHEN cTipoOp==aTipoOp[2] .and. !lTutteOp
@ 116, 100 SAY "Selezionare:" OF oDlg SIZE 55, 8 PIXEL
@ 114, 145 COMBOBOX aGet[17] VAR cUscite ITEMS aUscite SIZE 75,12 PIXEL OF oDlg WHEN !lTuscite .AND. cTipoOp==aTipoOp[2]
@ 250, 121 BUTTON oBtnOK PROMPT "&Conferma" SIZE 42, 12 PIXEL ACTION ( oDlg:end( IDOK ) )
oBtnOK:cTooltip := i18n("Conferma")
@ 250, 172 BUTTON oBtnCan PROMPT "&Annulla" SIZE 42, 12 PIXEL ACTION ( oDlg:end( IDCANCEL ) )
oBtnCan:cTooltip := i18n("Annulla la ricerca")
activate dialog oDlg
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com