LISTBOX and SELECT ... FOR not Refresh()

LISTBOX and SELECT ... FOR not Refresh()

Postby dbSoft » Thu Dec 08, 2005 9:40 pm

for All
GIVING HIM CODE IN THE cTMP_PEL AND THE LISTBOX
IT DOES NOT PRESENT THE REGISTRATIONS
IF I GIVE A PRICE IN THE cTMP_PEL FROM THE BEGINNING OF CODE
ARE PRESENTED THE REGISTRATIONS
IF GIVING HIM the OTHER CODE LISTBOX DOES NOT MAKE Update

Code: Select all  Expand view  RUN
local cTMP_PEL := cTOT := 0

   arr := {}
   AADD(arr,"PARG_PEL")
   AADD(arr,"PARG_EID")


    IF UseFile("PARAG" , .T. ,"DBFNTX" , arr  )
      dbPARAG := ALIAS()
      DBSELECTAREA( dbPARAG  )
    ELSE
      RETURN
    ENDIF

    DBSELECTAREA( dbPARAG  )
    DBSETORDER(1)


   bColor :=  nRGB( 204, 226, 204 )

   SET RESOURCES TO  ( lDLL + "PHASTORE.DLL"   )

   nAcolor := RGB(205, 205, 193)
   nBcolor := RGB(193, 205, 193)


DEFINE DIALOG prgDLG  RESOURCE 'PARAGTRN'   FONT oFnt12 ;
   TITLE " "

    REDEFINE TBTNGET oTMP_PEL VAR cTMP_PEL ;
      ID 103   OF    prgDLG   ;
      PICTURE "99999" ;
      RESOURCE "SEARCHE"                   ;
      ACTION  ( cTMP_PEL :=  I_LIST( "PELATES", "PELATES" , "PEL_TIT" , "TITLE1" , 1 ) ,;
      oTMP_PEL:Refresh()  ) ;
      VALID  (  oLbx:Refresh()  , .T. )



    REDEFINE LISTBOX oLbx                  ;
            FIELDS DTOC((dbPARAG)->DLT_DATE)  ,;
                   (dbPARAG)->DLT_PARX  ,;
                   STR(((dbPARAG)->DLT_PARN )) ,;
                   STR((dbPARAG)->DLT_TIMHX,10,4) ,;
                   STR((dbPARAG)->DLT_POSO,10,1)  ,;
                   STR((dbPARAG)->DLT_TOT ,10,2)  ,;
                   (dbPARAG)->DLT_PERIG  ;
            ALIAS  (dbPARAG)          ;
            ID 101                    ;
            OF    prgDLG              ;
            FIELDSIZES 80, 50, 80 ,100 ,100 ,100 ,300 ;
            COLORS CLR_BLACK, bColor   ;
            SELECT STR(DLT_PEL,5) FOR STR(cTMP_PEL,5)   ;
            HEADERS   "Date", "parx ", "parn " , "timh " , "poso" , " tot " ," perig "

            REDEFINE  GET oTOT  VAR cTOT   ID 102  OF prgDLG    FONT oFnt1 READONLY
            oLbx:aJustify = { .F., .F., .T., .T., .T. , .T., .F.}
            oLbx:lUpdate := .t.
   ACTIVATE DIALOG prgDLG

    (dbPARAG)->(dbCloseArea()  )
    prgDLG:End()
[/quote][/code]
User avatar
dbSoft
 
Posts: 16
Joined: Thu Oct 13, 2005 8:31 pm
Location: Greece

Postby Antonio Linares » Sat Dec 10, 2005 8:06 am

To use the SELECT clause, you must use the index key and the top limit and the bottom one, like this sample:

... SELECT Name FOR "Jan" TO "John"
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby dbSoft » Sat Dec 10, 2005 9:21 am

Antonio

THE INDEX IS STR(DLT_PEL,5)+DTOC(cDLT_DATE)

THE PROBLEM THEY IS IN THE BRIEFING OF LISTBOX

WHAT IT SHOULD I PUT IN THE VALID OF TMP_PEL

IF DEFAUL cTMP_PEL := 30156 ALL OK


Code: Select all  Expand view  RUN
[b]cTMP_PEL := 30156  [/b]

   DEFINE DIALOG prgDLG  RESOURCE 'PARAGTRN'   FONT oFnt12 ;
   TITLE " "

    REDEFINE GET oTMP_PEL VAR cTMP_PEL ;
      ID 103   OF    prgDLG   ;
      PICTURE "99999" ;
      VALID( oLbx:UpStable()  , oLbx:Refresh() , oLbx:GOTOP ()  , .T. )

      REDEFINE LISTBOX oLbx                  ;
            FIELDS DTOC((dbPARAG)->DLT_DATE)  ,;
                   (dbPARAG)->DLT_PARX  ,;
                   STR(((dbPARAG)->DLT_PARN )) ,;
                   STR((dbPARAG)->DLT_TIMHX,10,4) ,;
                   STR((dbPARAG)->DLT_POSO,10,1)  ,;
                   STR((dbPARAG)->DLT_TOT ,10,2)  ,;
                   (dbPARAG)->DLT_PERIG  ;
             ALIAS  (dbPARAG)          ;
             SELECT STR(DLT_PEL,5) FOR STR(cTMP_PEL,5) TO STR(cTMP_PEL,5) ;
            ID 101                    ;
            OF    prgDLG              ;
            FIELDSIZES 80, 50, 80 ,100 ,100 ,100 ,300 ;
           ...........................................................
User avatar
dbSoft
 
Posts: 16
Joined: Thu Oct 13, 2005 8:31 pm
Location: Greece

Postby Antonio Linares » Sun Dec 11, 2005 12:21 pm

You may review samples\gallery\onemany.prg for a working sample.

Please notice the use of oBrw:SetFilter( ... ) in the sample.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 3 guests