error with tm picker

error with tm picker

Postby Silvio » Thu Aug 07, 2008 5:26 pm

my code
Code: Select all  Expand view  RUN

#include "dtpicker.ch"

STATIC FUNCTION PRENOTAZIONE( oBtn )
   LOCAL oDlg, lReg:=.F.
   LOCAL cCustomer :=Space(40),oCustomer
   LOCAL oFont1,aOra,aVar:= Hora()

   DEFINE DIALOG oDlg ;
       FROM 317, 412 TO 475, 732 PIXEL ;
       TITLE "Prenotazione!"
          @ 1,  2 SAY " Sig./ra : " OF oDlg
          @ 1.3,  6 GET oCustomer VAR cCustomer OF oDlg SIZE 100, 10  VALID ! Empty(cCustomer)picture "@!"
          @ 2.6,  6 SAY "Alle ore  : " OF oDlg
          @ 2,  12  TMPicker aOra Var aVar SIZE 40, 10 Update of oDlg
          @ 3,  7 BUTTON "&Conferma" OF oDlg SIZE 30, 12 ACTION(lReg:=.T., oDlg:End())
          @ 3, 16 BUTTON "&Annula" OF oDlg  SIZE 30, 12 ACTION(lReg:=.F., oDlg:End()) CANCEL
          ACTIVATE DIALOG oDlg
return nil


STATIC FUNCTION Hora()

  local nAux, nMin, nHor, nSec, cMin, cHor, cSec
  nSec := Seconds()
  nAux := Int(nSec) / 3600
  nHor := Int(nAux)
  nAux := (nAux - nHor) * 60
  nMin := Int(nAux)
  nSec := Int( (nAux - nMin) * 60 )
  cHor := Padl( alltrim(str(nHor)), 2, '0')
  cMin := Padl( alltrim(str(nMin)), 2, '0')
  cSec := Padl( alltrim(str(nSec)), 2, '0')

  return cHor + cMin + cSec


it open a calendar instead of time select
why in tmpicker I see only datepicker ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby nageswaragunupudi » Fri Aug 08, 2008 4:08 am

After
@ 2, 12 TMPicker aOra Var aVar SIZE 40, 10 Update of oDlg

Insert this line

aOra:nStyle := nOr( aOra:nStyle, 9 )
Regards

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


Return to FiveWin for Harbour/xHarbour

Who is online

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