FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour PROBLEM WITH A TGET CONTROL & spinner
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
PROBLEM WITH A TGET CONTROL & spinner
Posted: Fri Nov 18, 2022 08:24 AM

Code (fw): Select all Collapse
#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 March-April 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: PROBLEM WITH A TGET CONTROL & spinner
Posted: Sat Nov 19, 2022 03:54 AM
Code (fw): Select all Collapse
@ 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 (fw): Select all Collapse
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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: PROBLEM WITH A TGET CONTROL & spinner
Posted: 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 March-April 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

Continue the discussion