FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TGet():New() and :bUp/:bDown
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
TGet():New() and :bUp/:bDown
Posted: Sat Feb 25, 2023 10:35 AM

Hi,

Creating a numeric GET control via the syntax TGet():New().

In it I need to specify a block of code :bUp and :bDown. How to do it ?

Posts: 1344
Joined: Wed Nov 16, 2005 09:14 PM
Re: TGet():New() and :bUp/:bDown
Posted: Sat Feb 25, 2023 12:33 PM
Fijate si así te puede servir
Code (fw): Select all Collapse
 #include "FiveWin.ch"
 
function Main()        
 
   local oDlg,oGet      
   local nVal := 0

   DEFINE DIALOG oDlg TITLE "Test"        
   oGet := TGet():New( 1, 1, {|| nVal}, oDlg, 40, 12, "999", ,;
               , , , , , ,;
               , ,, ,,,;
               , ,, ,;
               .f., {|| nVal++}, {|| nVal--}, 0, 20, , , ,;
               , , , ,,, ;
               {'..\bitmaps\minus.bmp','..\bitmaps\plus.bmp'})  
   ACTIVATE DIALOG oDlg CENTERED  
return nil
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: TGet():New() and :bUp/:bDown
Posted: Sat Feb 25, 2023 01:57 PM
Thank you for your help ! Everything works. However, I am interested in the option with spinner.
In this case, nothing works :(

Continue the discussion