karinha wrote:Mire en \samples\XBRCALEN.PRG si le ayuda. No entiendo muy bien lo que quieres hacer. Un ejemplo completo siempre es bienvenido para las críticas.
Look in \samples\XBRCALEN.PRG if it helps. I don't quite understand what you want to do. A complete example is always welcome for criticism.
Regards, saludos.
in fact I understood that you did not understand
Is simple
if the first combo is 1 and the second is 3 the value in the get must be 3 as the min value and 90 as the max
if the first combo is 2 and the second is 3 the value in the get must be 6 as the min value and 90 as the max
here is a little test, obviously it changes the value of the get but if the user presses the spinner he could put the value 1 instead of three or six
I wanted to block the minimum value
- Code: Select all Expand view RUN
#include "fivewin.ch"
#include "constant.ch"
Function test()
local oDlg, oBrw, oFont, oBold, oFontGet
local nBottom := 44
local nRight := 98
local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
local nHeight := nBottom * DLG_CHARPIX_H
local aGet:=array(10)
local oSay:=array(20)
local aFormazione:={"apples","bananas"}
local cFormazione:= "apples"
local aCalcolo:={"method 1","method 2",;
"method 3","method 4"}
local cCalcolo := "method 1"
local oCbx3
local nValore:= 1
local oCbx4
DEFINE DIALOG oDlg SIZE nWidth, nHeight ;
PIXEL TRUEPIXEL FONT oFont ; //RESIZABLE FONT oFont
TiTle " Test"
@ 480,510 SAY oSay[9] PROMPT "Fruit :" SIZE 80,20 PIXEL OF oDlg
@ 510,510 SAY oSay[10] PROMPT "Method :" SIZE 80,20 PIXEL OF oDlg
@ 540,510 SAY oSay[11] PROMPT "Value :" SIZE 80,20 PIXEL OF oDlg
@ 480,630 COMBOBOX oCbx3 Var cFormazione ITEMS aFormazione ;
SIZE 120,70 PIXEL OF oDlg HEIGHTGET 18 ;
ON CHANGE ( ResetValore(oCbx3:nAt,oCbx4:nAt, @nValore,aGet) )
@ 510,630 COMBOBOX oCbx4 Var cCalcolo ITEMS aCalcolo ;
SIZE 120,70 PIXEL OF oDlg HEIGHTGET 18 ;
ON CHANGE ( ResetValore(oCbx3:nAt,oCbx4:nAt, @nValore,aGet) )
@ 540,630 GET aGet[8] var nValore SIZE 100,20 PIXEL RIGHT OF oDlg SPINNER MIN 1 MAX 90
ACTIVATE DIALOG oDlg CENTERED
return nil
Function ResetValore(nForma,nMetodo, nValore,oControls)
Do case
case nForma= 1 .and. nMetodo= 3
nValore:= 3
case nForma= 2 .and. nMetodo= 3
nValore:= 6
otherwise
nValore:= 1
endcase
oControls[8]:SetText(nValore)
oControls[8]:refresh()
return nil
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