PROBLEM WITH A TGET CONTROL & spinner

PROBLEM WITH A TGET CONTROL & spinner

Postby Silvio.Falconi » Fri Nov 18, 2022 8:24 am

Image

Code: Select all  Expand view
#include "FiveWin.ch"
#include "Constant.ch"

 Function test()
   local oDlg,oBrw,oFont
   local cTitle:= "Tabella Premi"
   local nBottom   := 27.3
   local nRight    := 110
   local nWidth    := Max( nRight * DLG_CHARPIX_W, 180 )
   local nHeight   := nBottom * DLG_CHARPIX_H


   local nGiocata:= 1.00
   local aGet[1]

 DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12
DEFINE DIALOG oDlg SIZE  nWidth, nHeight  ;
   PIXEL TRUEPIXEL FONT oFont    ;  
   TiTle cTitle

@ 100,10 GET aGet[1] VAR  nGiocata SPINNER MIN 0.50 MAX 200  ;
      ON UP 0.50 ON DOWN 0.50 ;
      SIZE 80,24 RIGHT PIXEL of oDlg PICTURE "€ 999.99"

ACTIVATE DIALOG oDlg center
return nil



if I press the spinner nothing happens
the only one if I take off ON UP 0.50 ON DOWN 0.50 ;
but I would like the end user to be able to select € 0.50 at a time from a minimum of € 0.50 to a maximum of € 200 and the initial value must be € 1.00
why not run ?
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
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm

Re: PROBLEM WITH A TGET CONTROL & spinner

Postby nageswaragunupudi » Sat Nov 19, 2022 3:54 am

Code: Select all  Expand view
@ 100,10 GET aGet[1] VAR  nGiocata SPINNER MIN 0.50 MAX 200  ;
      ON UP   GetStep( aGet[ 1 ],  0.50 ) ;
      ON DOWN GetStep( aGet[ 1 ], -0.50 ) ;
      SIZE 80,24 RIGHT PIXEL of oDlg PICTURE "€ 999.99"
 


Code: Select all  Expand view
static function GetStep( oGet, nAdd )

   local nValue   := oGet:Value + nAdd

   nValue   := Max( Min( nValue, Eval( oGet:bMax ) ), Eval( oGet:bMin ) )

   oGet:cText  := nValue
   XEval( oGet:bChange )

return nil          
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: PROBLEM WITH A TGET CONTROL & spinner

Postby Silvio.Falconi » Sun Nov 20, 2022 12:29 pm

thanks Rao
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
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

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