FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour dolphin y xbrowse
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
dolphin y xbrowse
Posted: Tue Feb 25, 2014 08:46 AM
Hola.

esto esta mal, como lo hago bien?

Code (fw): Select all Collapse
 聽 聽 DEFINE QUERY oQuery "SELECT * FROM tbempresas order by tbempresas.empresa"
聽 聽 聽 oBrw:= TXBROWSE():new(oDlg)
聽 聽 聽 聽 聽WITH OBJECT oBrw
聽 聽 聽 聽 聽 聽 :bClrStd 聽 聽:= { || If( oBrw:KeyNo() % 2 == 0, ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 { CLR_BLACK, RGB( 224, 236, 255 ) }, ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 { CLR_BLACK, RGB( 199, 251, 253 ) } ) }

聽 聽 聽 聽 聽 聽 :bClrRowFocus 聽 聽 := { || { CLR_BLACK, CLR_WHITE} }

聽 聽 聽 聽 聽 聽 :nMarqueeStyle 聽 := 5
聽 聽 聽 聽 聽 聽 :nRowHeight 聽 聽 聽:= 22
聽 聽 聽 聽 聽 聽 :lRecordSelector := .F.
聽 聽 聽 聽 聽 聽 :lColDividerComplete := .f.
聽 聽 聽 聽 聽 聽 :nRowDividerStyle:= 4
聽 聽 聽 聽 聽 聽 :nStretchCol := STRETCHCOL_LAST
聽 聽 聽 聽 聽 聽 :nColDividerStyle:= 聽4

聽 聽 聽 聽 聽 聽 :aCols[1]:nWidth 聽 聽 聽 聽 聽 := 120
聽 聽 聽 聽 聽 聽 :aCols[1]:cHeader 聽 聽 聽 聽 聽:= "Empresa"
聽 聽 聽 聽 聽 聽 :acols[1]:bData:= { || oQuery:ID_PROG} 聽 聽 聽 聽 聽 聽 聽 <--------------------- esto esta mal.
聽 聽 聽 聽 聽 聽 :aCols[1]:nEditType 聽 聽 聽 聽:= 1
聽 聽 聽 聽 聽 聽 :acols[1]:cEditPicture 聽 聽 := "@99/99/9999"
聽 聽 聽 聽 聽 聽 :aCols[1]:nDataStrAlign 聽 聽:= AL_CENTER
聽 聽 聽 聽 聽 聽 :aCols[1]:nHeadStrAlign 聽 聽:= AL_CENTER
聽 聽 end with
聽 聽 oBrw:setdolphin(oquery,.T., .T.)
...
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Posts: 2064
Joined: Fri Jan 06, 2006 09:28 PM
Re: dolphin y xbrowse
Posted: Tue Feb 25, 2014 06:31 PM

Porque usas un formato picture de fecha.? veo que el nombre es de empresa y el campo paraciera que fuese un campo uno ID...saludos... :shock:

Dios no est谩 muerto...



Gracias a mi Dios ante todo!
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: dolphin y xbrowse
Posted: Tue Feb 25, 2014 08:02 PM
No uso TDolphin, pero me da la impresion que aqui:
:acols[1]:= { || oQuery:ID_PROG} <--------------------- esto esta mal.

...deberia ser: acols[1]:bEditValue:= { || oQuery:ID_PROG} o acols[1]:= { || oQuery:ID_PROG}
Saludos.
Francisco J. Alegr铆a P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: dolphin y xbrowse
Posted: Wed Feb 26, 2014 10:23 AM
joseluisysturiz wrote:Porque usas un formato picture de fecha.? veo que el nombre es de empresa y el campo paraciera que fuese un campo uno ID...saludos... :-)


porque estaba probando el xbrowse y la columna y tom茅 el c贸digo que estoy utilizando para otro m贸dulo.

Gracias.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: dolphin y xbrowse
Posted: Wed Feb 26, 2014 10:23 AM
FranciscoA wrote:No uso TDolphin, pero me da la impresion que aqui:
:acols[1]:= { || oQuery:ID_PROG} <--------------------- esto esta mal.

...deberia ser: acols[1]:bEditValue:= { || oQuery:ID_PROG} o acols[1]:= { || oQuery:ID_PROG}
Saludos.


gracias.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Posts: 1380
Joined: Fri Oct 14, 2005 01:28 PM
Re: dolphin y xbrowse
Posted: Wed Feb 26, 2014 01:08 PM
Goosfancito;
esta es otra forma de acerlo
Code (fw): Select all Collapse
聽 聽 聽 聽 DEFINE QUERY oQuery "SELECT * FROM tbempresas order by tbempresas.empresa"

聽 聽 聽 聽 REDEFINE XBROWSE oBrw OBJECT oQuery ID 100 ;
聽 聽 聽 聽 HEADERS "Empresa" AUTOSORT 

聽 聽 聽 聽 WITH OBJECT oBrw
聽 聽 聽 聽 聽 聽 :bClrStd:= { || If( oBrw:KeyNo() % 2 == 0, ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 { CLR_BLACK, RGB( 224, 236, 255 ) }, ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 { CLR_BLACK, RGB( 199, 251, 253 ) } ) }

聽 聽 聽 聽 聽 聽 :bClrRowFocus 聽 聽 := { || { CLR_BLACK, CLR_WHITE} }

聽 聽 聽 聽 聽 聽 :nMarqueeStyle 聽 := 5
聽 聽 聽 聽 聽 聽 :nRowHeight 聽 聽 聽:= 22
聽 聽 聽 聽 聽 聽 :lRecordSelector := .F.
聽 聽 聽 聽 聽 聽 :lColDividerComplete := .f.
聽 聽 聽 聽 聽 聽 :nRowDividerStyle:= 4
聽 聽 聽 聽 聽 聽 :nStretchCol := STRETCHCOL_LAST
聽 聽 聽 聽 聽 聽 :nColDividerStyle:= 聽4
聽 聽 聽 聽 end with
聽 聽 
聽 聽 聽 聽 WITH OBJECT oBrw:Empresa
聽 聽 聽 聽 聽 聽 :nWidth 聽 聽 聽 聽 聽 := 120
聽 聽 聽 聽 聽 聽 :nEditType 聽 聽 聽 聽:= 1
聽 聽 聽 聽 聽 聽 :cEditPicture 聽 聽 := "@99/99/9999"
聽 聽 聽 聽 聽 聽 :nDataStrAlign 聽 聽:= AL_CENTER
聽 聽 聽 聽 聽 聽 :nHeadStrAlign 聽 聽:= AL_CENTER
聽 聽 聽 聽 end with
Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: dolphin y xbrowse
Posted: Wed Feb 26, 2014 01:48 PM

gracias.
eso en el caso de ser un solo campo no?

FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Posts: 1380
Joined: Fri Oct 14, 2005 01:28 PM
Re: dolphin y xbrowse
Posted: Wed Feb 26, 2014 09:14 PM
Nop;
lo puse en funcion de tu ejemplo. Podes agregar otros campos separando por comas luego de Headers
Code (fw): Select all Collapse
 聽 聽 聽 DEFINE QUERY oQuery "SELECT * FROM tbempresas order by tbempresas.empresa"

聽 聽 聽 聽 REDEFINE XBROWSE oBrw OBJECT oQuery ID 100 ;
聽 聽 聽 聽 HEADERS "Empresa", "Direccion", "Ciudad",... AUTOSORT // esto es para hacer b煤squedas sensitivas

Algo para tener en cuenta. No podr铆as usar "Direcci贸n" (en caso hipotetico de que existe ese campo), porque luego, no podr铆as hacer el with object oBrw:Direcci贸n.
Estos headers son, en realidad, la definici贸n de los campos de la tabla.
O sea, suponiendo que al campo direcci贸n la hayas nombrado DIREC, entonces podr铆as hacer lo siguiente

Code (fw): Select all Collapse
 聽 聽 聽 DEFINE QUERY oQuery "SELECT * FROM tbempresas order by tbempresas.empresa"

聽 聽 聽 聽 REDEFINE XBROWSE oBrw OBJECT oQuery ID 100 ;
聽 聽 聽 聽 HEADERS "Empresa", "Direc", "Ciudad",... AUTOSORT 

聽 聽 聽 聽with object oBrow:Direc
聽 聽 聽 聽 聽 :cHeader:= "Direcci贸n" 聽// Para que, en la vista del Browse, la columna tenga una descripci贸n legible (o algo como "La Direcci贸n")
聽 聽 聽 聽 聽 ...
聽 聽 聽 聽end
Resistencia - "Ciudad de las Esculturas"

Chaco - Argentina
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: dolphin y xbrowse
Posted: Fri Feb 28, 2014 09:57 PM
Gracias.-

MarioG wrote:Nop;
lo puse en funcion de tu ejemplo. Podes agregar otros campos separando por comas luego de Headers
Code (fw): Select all Collapse
 聽 聽 聽 DEFINE QUERY oQuery "SELECT * FROM tbempresas order by tbempresas.empresa"

聽 聽 聽 聽 REDEFINE XBROWSE oBrw OBJECT oQuery ID 100 ;
聽 聽 聽 聽 HEADERS "Empresa", "Direccion", "Ciudad",... AUTOSORT // esto es para hacer b煤squedas sensitivas

Algo para tener en cuenta. No podr铆as usar "Direcci贸n" (en caso hipotetico de que existe ese campo), porque luego, no podr铆as hacer el with object oBrw:Direcci贸n.
Estos headers son, en realidad, la definici贸n de los campos de la tabla.
O sea, suponiendo que al campo direcci贸n la hayas nombrado DIREC, entonces podr铆as hacer lo siguiente

Code (fw): Select all Collapse
 聽 聽 聽 DEFINE QUERY oQuery "SELECT * FROM tbempresas order by tbempresas.empresa"

聽 聽 聽 聽 REDEFINE XBROWSE oBrw OBJECT oQuery ID 100 ;
聽 聽 聽 聽 HEADERS "Empresa", "Direc", "Ciudad",... AUTOSORT 

聽 聽 聽 聽with object oBrow:Direc
聽 聽 聽 聽 聽 :cHeader:= "Direcci贸n" 聽// Para que, en la vista del Browse, la columna tenga una descripci贸n legible (o algo como "La Direcci贸n")
聽 聽 聽 聽 聽 ...
聽 聽 聽 聽end
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/

Continue the discussion