lGetBar

Re: lGetBar

Postby Marcelo Roggeri » Mon Apr 01, 2019 12:56 pm

Mr. Rao encontré el problema después de tanto comentar código hasta encontrar que era.
Comente la altura que le doy a los get y de esa forma me muestra los combo
//oSelf:oBrw:nGetBarHeight := 33
Mi pregunta es por que en cierto momento me lo mostraba y ahora no?
Esteticamente queda el combo mas grande que los get.
Es posible dar la altura de los get habilitando oSelf:oBrw:nGetBarHeight := 33
Gracias y saludos
Marcelo
FWH - Harbour - BCC7 - PellesC
User avatar
Marcelo Roggeri
 
Posts: 325
Joined: Sat Jul 22, 2006 9:04 pm
Location: Venado Tuerto - Santa Fe -Argentina

Re: lGetBar

Postby Horizon » Sun Jan 05, 2020 4:22 pm

nageswaragunupudi wrote:I mean, ::aRubro is assigned with the array before executing the statement
Code: Select all  Expand view

::oBrw:aCols[5]:aBarGetList   := ::aRubro
 

not after.

For the purpose of testing, please try
Code: Select all  Expand view

::oBrw:aCols[5]:aBarGetList   := { "one", "two", "three" }
 


Hi Mr. Rao,

We should set the aLists to aBarGetList since now. Is it possible to set {aLists, aItems} to aBarGetList? (using dbcombo)

Thanks.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1297
Joined: Fri May 23, 2008 1:33 pm

Re: lGetBar

Postby Horizon » Sun Jan 05, 2020 6:40 pm

Hi,

I have changed xbrowse.prg like below and xbrowse now supports

aBarGetList := {aLists, aItems}


Changes:
Code: Select all  Expand view
#include "adodef.ch"

#define UNDER_TEST_FOCUS


to

Code: Select all  Expand view
#include "adodef.ch"
#include "dbcombo.ch"

#define UNDER_TEST_FOCUS


and

Code: Select all  Expand view
     if .not. Empty( ::aBarGetList )
         @ 0,0 COMBOBOX ::oBarGet VAR ::uBarGetVal SIZE ::nWidth, 200 PIXEL OF ::oBrw ;
            ITEMS ::aBarGetList COLOR aColors[ 1 ], aColors[ 2 ] ;
            FONT ::DataFont()
         ::oBarGet:bValid  := ::bBarGetValid()
      elseif ValType( ::uBarGetVal ) == "L"
 


to

Code: Select all  Expand view
     if .not. Empty( ::aBarGetList )
        IF LEN(::aBarGetList)=2 .AND. ValType( ::aBarGetList[2])="A"
            @ 0,0 DBCOMBO ::oBarGet VAR ::uBarGetVal SIZE ::nWidth, 200 PIXEL OF ::oBrw ;
            ITEMS ::aBarGetList[2] LIST ::aBarGetList[1] COLOR aColors[ 1 ], aColors[ 2 ] ;
            FONT ::DataFont()
        ELSE
            @ 0,0 COMBOBOX ::oBarGet VAR ::uBarGetVal SIZE ::nWidth, 200 PIXEL OF ::oBrw ;
            ITEMS ::aBarGetList COLOR aColors[ 1 ], aColors[ 2 ] ;
            FONT ::DataFont()
        ENDIF
        ::oBarGet:bValid  := ::bBarGetValid()
      elseif ValType( ::uBarGetVal ) == "L"
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1297
Joined: Fri May 23, 2008 1:33 pm

Re: lGetBar

Postby Marcelo Roggeri » Sat Jun 13, 2020 2:40 pm

Hola buenos días, siguiendo el hilo del tema lGetBar, me encontré con la siguiente situación
Estoy haciendo un registro de cheques, el cual tiene que tener la opcion de buscar un cliente, no lo hago con EDIT_LISTBOX porque no puedo buscar o filtrar.
Entonces puse un browse dentro y no me aparece la lGetBar. Voy a compartir el codigo y una imagen para que sea mas claro de entender.
Code: Select all  Expand view

.
.
.
                 *----------------------------------------------------------
                 WITH OBJECT oBrw:aCols[2]


                      //:nEditType       := EDIT_LISTBOX
                      //:aEditListTxt    := ArrTranspose( aQRcliente )[2]
                      //:bOnChange       := { | oGet, oCol | ( ValidaCliente(oQry,oGet:value,aQRcliente),;
                      //                                       lNewRec:=.T.,;
                      //                                       IF(oQry:id_cliente<>0 .AND. Empty(oQry:opcion),oQry:opcion:="U",) ) }


                      :bStrData      := {|| oQry:nombre_fantasia }
                      :nEditType     := EDIT_BUTTON
                      :bEditBlock    := {|nRow,nCol| buscoClientesCheque(oBrw,oQry,nRow,nCol,@hVar) }
                      :bOnPostEdit   := {|oCol,xVal,nKey| IIF(nKey!=VK_ESCAPE, ( lNewRec:=.T.,;
                                                                                 oQry:id_cliente      := hVar["idCliente"],;
                                                                                 oQry:nombre_fantasia := hVar["NombreCli"],;
                                                                                 oQry:opcion:="U",;
                                                                                 oBrw:Refresh() ),)}


                 END
                 *----------------------------------------------------------
.
.
.

****************************************************************************
*
FUNCTION buscoClientesCheque(oBrwCont,oQry,nRow,nCol,hVar)
         LOCAL oDlg, oBrw, oCol, oNomCli, nCurrent
         LOCAL oQryCli, cQryCli
         LOCAL nAnchoDlg:=oBrwCont:aCols[2]:nWidth
         //-----------------------------------------------------------------
         cQryCli := "SELECT id_cliente,"
         cQryCli +=        "nombre_fantasia "
         cQryCli += "FROM cliente "
         cQryCli += "ORDER BY nombre_fantasia"
         DEFINE QUERY oQryCli cQryCli
         //-----------------------------------------------------------------

   //    nAnchoDlg := 750

         DEFINE DIALOG oDlg PIXEL TRUEPIXEL SIZE nAnchoDlg-3,250 STYLE WS_POPUP FONT hFnt["Brw"]

                @ 0,0 XBROWSE oBrw OF oDlg FONT hFnt["Brw"] UPDATE  //OBJECT oQryCli //PIXEL //SIZE nAnchoDlg-3,310
                *-----------------------------------------------------------
                oCol := oBrw:AddCol()
                   oCol:cHeader       := "Cliente"
                   oCol:bStrData      := { || oQryCli:nombre_fantasia }
                   oCol:nDataStrAlign := AL_LEFT
                   oCol:nWidth        := nAnchoDlg-3
                *-----------------------------------------------------------

                *-----------------------------------------------------------

                // BARRA DE BUSQUEDA
                oBrw:lGetBar       := .T.
                oBrw:nGetBarHeight := 35
                //oBrw:aCols[1]:lBarGetOnKey  := .T.
                //oBrw:aCols[1]:cBarGetPic    := "@15"
                oBrw:aCols[1]:uBarGetVal    := Space(15)
                oBrw:aCols[1]:cBarGetBmp    := "BB_SEARCH(30x30)"
                oBrw:aCols[1]:bBarGetAction := {|| SetFilterRegistroCli(oBrw,oQryCli) }
                oBrw:aCols[1]:bBarGetValid  := {|x| SetFilterRegistroCli(oBrw,oQryCli), .T.}
                oBrw:bClrEdits              := {|| { CLR_BLACK,rgb(255,250,240) } }
                // BARRA DE BUSQUEDA

                *-----------------------------------------------------------

                WITH OBJECT oBrw

                     :nHeight             := 250
                     :lHeader             := .F.
                     :nHeaderLines        := 0    // número de líneas de la cabecera
                     :nHeaderHeight       := 0   // Altura cabeceras de columna

                     //:lSeekWild           := .T.
                     //:lSeekBar            := .t.
                     //:lIncrFilter         := .F.
                     :cFilterFld          := "Cliente"

                     //:bChange             := {|| oBrw:Refresh() }
                     //:bSeekChange         := {|| oBrw:Refresh() }

                     :nRowHeight          := 35
                     :nMarqueeStyle       := MARQSTYLE_HIGHLROW // Estilo marquesina (fila seleccionada) 0 No 1 Marquesina punteada celular 2 Solid celular 3 Resalte la celda 4 fila resaltada y Levante teléfono 5
                     :nRowDividerStyle    := LINESTYLE_LIGHTGRAY
                     :nColDividerStyle    := LINESTYLE_LIGHTGRAY
                     :bClrSel             := {||{nRGB(255,255,255),nRGB(000,128,255)}}// para barra de linea selecc cuando el control no tiene el foco
                     :l2007               := .F.
                     :lAllowColHiding     := .T.  // Anulo el menu contextual al hacer click sobre el Header del browse
                     :lRecordSelector     := .F.  //poner o no, COL de la flechita de la izq

                     :lHScroll            := .F.
                     :lVScroll            := .T.

                     :lColDividerComplete := .T. //completa pintado hasta el footer cuando lineas no llenan todo el browse
                     :lFastEdit           := .F.

                     :SetColor( CLR_BLACK, RGB(255,255,255) )

                     :bKeyDown  := {|nKey| If( nKey==VK_SPACE,( hVar["idCliente"]:=oQryCli:id_cliente,;
                                                                hVar["NombreCli"]:=oQryCli:nombre_fantasia,;
                                                                oDlg:End() ),) }//IF( nKey==VK_ESCAPE,oDlg:End(),)

                     //:blDblClick          := {|nRow, nCol, nFlags| ( nNroCli := oQryCli:id_cliente,;
                     //                                                  oDlg:End() ) }
                     :blDblClick          := {|| eval(:bKeyDown,VK_SPACE)  }

                END WITH

                oBrw:SetDolphin( oQryCli,.F.,.T.)

                oBrw:CreateFromCode()

         ACTIVATE DIALOG oDlg ON INIT oDlg:Move(nRow+215,nCol)


 


Image
FWH - Harbour - BCC7 - PellesC
User avatar
Marcelo Roggeri
 
Posts: 325
Joined: Sat Jul 22, 2006 9:04 pm
Location: Venado Tuerto - Santa Fe -Argentina

Re: lGetBar

Postby Marcelo Roggeri » Fri May 06, 2022 1:35 pm

Hola buenos días, siguiendo el hilo del tema, quisiera lograr lo siguiente:

:aCols[7]:cBarGetPic := "99.99.99"

tengo este picture en el get de filtro, necesito que al hacer click se posicione al inicio del get, como le puse al string dos puntos ya que necesito ingresar un codigo separado por puntos Ej 62.01.02

Espero haberme explicado y quedo a la espera
Gracias de antemano y saludos
Marcelo
FWH - Harbour - BCC7 - PellesC
User avatar
Marcelo Roggeri
 
Posts: 325
Joined: Sat Jul 22, 2006 9:04 pm
Location: Venado Tuerto - Santa Fe -Argentina

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Enrico Maria Giordano, Otto and 114 guests