Ttime pick of fgondi

Ttime pick of fgondi

Postby Silvio » Mon Mar 27, 2006 12:15 pm

when I try with resource it run ok but if i create a dialog simply ( NO RES) with two get

one get = date pick
second get = time pick

give me allways date pick


why ?

Regards
Best Regards, Saludos

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

Postby fgondi » Mon Mar 27, 2006 3:04 pm

Hola Silvio,

Puedes mostrar algo del código en la definición de los get's?
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Postby Silvio » Mon Mar 27, 2006 10:09 pm

Code: Select all  Expand view  RUN
#include "FiveWin.ch"
#include "Tmpicker.ch"
#include "Dtpicker.ch"

FUNCTION MAIN()

    LOCAL oDlg,  cTime, dDate
        LOCAL oTime,  oDate
    cTime := Time()
    dDate := Date()

    DEFINE DIALOG oDlg

    @ 1,1 say "Time :" of oDlg
    @ 1,5 TMPICKER oTime var cTime of oDlg size 45,10

    @ 3,1 say "Date :" of oDlg
    @ 3,5 DTPICKER oDate var dDate of oDlg  size 45,10

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL
Best Regards, Saludos

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

Postby fgondi » Mon Mar 27, 2006 11:14 pm

Hola silvio,

Hay que hacer unas modificaciones en la clase ttimepick, así como en el ch correspondiente.

En el ch:
Code: Select all  Expand view  RUN
#define DTS_UPDOWN                  1  // use UPDOWN instead of MONTHCAL
#define DTS_SHOWNONE                2  // allow a NONE or checkbox selection
#define DTS_SHORTDATEFORMAT         0  // use the short date format
#define DTS_LONGDATEFORMAT          4  // use the long date
#define DTS_SHORTDATECENTURYFORMAT 12  // short date format with century
#define DTS_TIMEFORMAT              9  // use the time
#define DTS_RIGHTALIGN             32  // right-align popup instead of left-align

En el prg:
Code: Select all  Expand view  RUN
METHOD New( nRow, nCol, bSetGet, oWnd, nWidth, nHeight, bValid, nClrFore,;
            nClrBack, oFont, lDesign, oCursor, lPixel, cMsg, lUpdate,;
            bWhen, bChange, nHelpId) Class TTimePick

   DEFAULT nRow     := 0, nCol := 0,;
           oWnd     := GetWndDefault(),;
           nWidth   := 100,;
           nHeight  := If( oFont != nil, oFont:nHeight, 22 ),;
           nClrFore := GetSysColor( COLOR_WINDOWTEXT ),;
           nClrBack := GetSysColor( COLOR_WINDOW ),;
           oFont    := oWnd:oFont,;
           nHelpId  := 100,;
           lDesign  := .f.,;
           lPixel   := .f.,;
           lUpdate  := .f.

   ::cCaption  = ""
   ::nTop      = nRow * If( ! lPixel, BTN_CHARPIX_H, 1 )
   ::nLeft     = nCol * If( ! lPixel, BTN_CHARPIX_W, 1 )
   ::nBottom   = ::nTop  + nHeight
   ::nRight    = ::nLeft + nWidth
   ::nHelpId   = nHelpId
   ::oWnd      = oWnd
   ::oFont     = oFont
   ::bSetGet   = bSetGet
   ::nStyle    = nOR( WS_CHILD, WS_VISIBLE, WS_TABSTOP, DTS_TIMEFORMAT, ;
                     If( lDesign, WS_CLIPSIBLINGS, 0 ) )

   ::nId       = ::GetNewId()
   ::lDrag     = lDesign
   ::lCaptured = .f.
   ::cMsg      = cMsg
   ::lUpdate   = lUpdate
   ::bWhen     = bWhen
   ::bValid    = bValid
   ::bChange   = bChange

   InitCommon()

   if ! Empty( oWnd:hWnd )
      ::Create( "SysDateTimePick32" )
      oWnd:AddControl( Self )
      if oFont != nil
         ::SetFont( oFont )
      endif
   else
      oWnd:DefControl( Self )
   endif

   if lDesign
      ::CheckDots()
   endif

return Self


Hay que incluir "DTS_TIMEFORMAT" en la función "nOr"
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Postby Silvio » Mon Mar 27, 2006 11:43 pm

Can I have all two classes with the modifies ?
thanks
Best Regards, Saludos

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

Postby fgondi » Tue Mar 28, 2006 12:08 am

Hola Silvio,

The modifications affect only to the class ttimepick, although include's is worth for the two classes.
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Postby Silvio » Tue Mar 28, 2006 2:27 pm

sorry but on my exe there is also the error...
Can you send me the new classes ( ttimepick and datepick) and you modifications and the sreenshot of your exe please

Regards
Best Regards, Saludos

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

Postby fgondi » Tue Mar 28, 2006 4:20 pm

Hola Silvio,

Te he mandado por correo la clase ttmpick.prg

De todas formas Juan Carlos Salinas Ojeda ya conoce los cambios a realizar y lo modificará en la clase que tiene disponible para todos.
Un saludo
Fernando González Diez
ALSIS Sistemas Informáticos
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Postby Silvio » Tue Mar 28, 2006 4:37 pm

where you sent the file ?

I not received it

Regards
Best Regards, Saludos

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


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests