TGet():New() and :bUp/:bDown

TGet():New() and :bUp/:bDown

Postby Natter » 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 ?
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Re: TGet():New() and :bUp/:bDown

Postby cmsoft » Sat Feb 25, 2023 12:33 pm

Fijate si así te puede servir
Code: Select all  Expand view  RUN
#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
User avatar
cmsoft
 
Posts: 1292
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: TGet():New() and :bUp/:bDown

Postby Natter » Sat Feb 25, 2023 1:57 pm

Thank you for your help ! Everything works. However, I am interested in the option with spinner.
In this case, nothing works :(
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

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