XBrowse - SetCheck

XBrowse - SetCheck

Postby cnavarro » Sun Apr 14, 2013 5:44 pm

Buenas tardes
No consigo poder editar un checkbox en el xbrowse con un array en el que la columna puede coger valores .T. o .F.
He estado mirando los ejemplos que aparecen en el foro pero no llego a hacer que funcione.
Adjunto codigo
Agradeceria cualquier ayuda..
Gracias
Code: Select all  Expand view

function BuildBrwPrgs( oFld )
local oCheck
local lOn     := .F.

// Estructura del Array de Datos
// static aPrgs      := { { "", "", "", "" , .F. } }

   @ 0, 0 XBROWSE oBrwPrgs ARRAY aPrgs SIZE 300, 180 PIXEL OF oFld:aDialogs[ 1 ] ;
          FONT oFont //CELL

   ADD oCheck TO oBrwPrgs HEADER "S"    DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 5 ] SIZE  18 //CENTER
   oCheck:SetCheck( nil , .T. ,  )   //{"Si","No",""} )
   //oBrwPrgs:aCols[ 1 ]:aEditListBound:= { .T. , .F. }


   ADD TO oBrwPrgs HEADER "Nombre"      DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 1 ] SIZE 280 //CENTER
   ADD TO oBrwPrgs HEADER "Size"        DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 2 ] SIZE  80 RIGHT
   ADD TO oBrwPrgs HEADER "Fecha"       DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 3 ] SIZE  80 CENTER
   ADD TO oBrwPrgs HEADER "Descripcion" DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 4 ] SIZE 300 //CENTER


   oBrwPrgs:nMarqueeStyle = MARQSTYLE_HIGHLROW  //CELL      //HIGHLROW
   oBrwPrgs:nRowHeight    = 18
   oBrwPrgs:bClrSel       = { || { CLR_WHITE, CLR_BLUE } }
   oBrwPrgs:lFooter       = .T.

   oBrwPrgs:aCols[ 2 ]:cFooter     = "Total Ficheros: " + ;
            if( empty( aPrgs[1][1] ), "   0" , Str( Len( oBrwPrgs:aArrayData ) , 4 ) )


   //oBrwPrgs:lFastEdit              = .T.
   oBrwPrgs:aCols[ 5 ]:nEditType   = EDIT_GET     // LISTBOX
   //oBrwPrgs:aCols[ 5 ]:bOnPostEdit = { | o, v | aPrgs[ oBrwPrgs:nArrayAt ][ 4 ] := v }

   oBrwPrgs:CreateFromCode()

   oFld:aDialogs[ 1 ]:SetControl( oBrwPrgs )

return oBrwPrgs

 
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6504
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse - SetCheck

Postby joseluisysturiz » Mon Apr 15, 2013 2:19 am

Asi lo hago y me funciona al 100%, primero defino el array asi LOCAL aDepositos := {} y luego el xbrowse con una funcion que hice para el tilde o destilde del checkbox, espero te sirva aunque sea de guia, saludos... :shock:

Code: Select all  Expand view
  oBrwChq := TXBrowse():New( oFldx:aDialogs[2] )

   WITH OBJECT oBrwChq
      :nMarqueeStyle    := MARQSTYLE_HIGHLROW
      :nColDividerStyle := LINESTYLE_BLACK
      :lColDividerComplete := .t.
      :nHeaderHeight := 20
      :l2007 := .t.
      :lFooter := .t.
      :lRecordSelector := .t. // SI/NO 1RA.COL.IZQ.QUE TIENE LA FLECHITA NEGRA
      :lAllowColHiding := .f. // SI/NO BOTON DERECHO SOBRE CABEZERA, MUESTRE ARRAY COL.
      :lAllowColSwapping := .f. // SI/NO INTERCAMBIAR COL.
      :bClrStd := {|| IF( oBrwChq:nArrayAt % 2 == 0, {CLR_BLACK, CLR_WHITE}, {0, RGB(203,226,254)} ) }

      :bLDblClick := {|| tildacheque( aVar, aGet, oBrwChq ) } // DOBLE CLICK

      :bKeyDown= {|nKey| IF ( nKey  == VK_RETURN .or. nKey == VK_SPACE ,; // ENTER o ESPACIO
                              tildacheque( aVar, aGet, oBrwChq ),  ) }

   END WITH


columna del checkbox

oCol := oBrwChq:AddCol()
   oCol:cHeader       := "Sel"
   oCol:bStrData      := {|| IIF( LEN( aDepositos ) == 0, SPACE(5) ,;
                                  aDepositos[oBrwChq:nArrayAt, 6] ) }
   oCol:nHeadStrAlign := AL_CENTER
   oCol:nDataStrAlign := AL_CENTER
   oCol:nWidth        := 20
   oCol:nArrayCol     := 6
   oCol:cToolTip      := "Doble Click/ENTER/ESPACIO para marcar o descargar CHEQUE."
   oCol:SetCheck( { "OK16", } ) // ACA LLAMO UNA IMAGEN QUE ESTA EN RECURSO...

   oBrwChq:CreateFromResource(99)
   oBrwChq:SetArray( aDepositos, .t. )


la funcion tildacheque()

PROCEDURE tildacheque( aVar, aGet, oBrwChq ) // MARCA/DESCARCA CHEQUES A DEPOSITAR

   IF LEN( oBrwChq:aArrayData ) > 0

      IF oBrwChq:aArrayData[oBrwChq:nArrayAt, 6] == .f.
         oBrwChq:aArrayData[oBrwChq:nArrayAt, 6] := .t.

         aVar[11] := aVar[11] + oBrwChq:aArrayData[oBrwChq:nArrayAt, 5]

      ELSE
         oBrwChq:aArrayData[oBrwChq:nArrayAt, 6] := .f.

         aVar[11] := aVar[11] - oBrwChq:aArrayData[oBrwChq:nArrayAt, 5]

      ENDIF

   ENDIF

   aVar[12] := aVar[10] + aVar[11] // TOT.DEPOSITAR

   aGet[11]:REFRESH() // MTO.CHEQUES
   aGet[12]:REFRESH() // TOT.DEPOSITAR

   oBrwChq:REFRESH()

RETURN
 
Dios no está muerto...

Gracias a mi Dios ante todo!
User avatar
joseluisysturiz
 
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela

Re: XBrowse - SetCheck

Postby cnavarro » Mon Apr 15, 2013 7:50 pm

Jose Luis
Muchas gracias por tu ejemplo
Mi error estaba en que por lo que "creía" haber leído en el foro (inglés), el funcionamiento de la edición de ese tipo de columna era "automático" y no necesitaba programarlo al igual que se hace con cualquier edición "especial" que hacemos en otras columnas (p.j. de validación o cálculo).
Para eso pensaba que servía: oBrwPrgs:aCols[ 1 ]:aEditListBound:= { .T. , .F. }

Por otra parte, he notado que cuando hago "dobleclick" o "SPACE" estando posicionado en la columna del CheckBox, no me cambia, sin embargo si estoy en la 2 columna si funciona, pulse donde pulse incluso en el recordselector, con el SPACE, funciona siempre que no esté situado en la columna del Check, como he comentado.
Puede ser mi versión de 12.03 ?, creo que había leído algo en el foro de inglés aunque ya no me fío de mi traducción.
Así me ha quedado:
Code: Select all  Expand view

   ADD oCheck TO oBrwPrgs HEADER "S"    DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 5 ] SIZE  18 //CENTER
   oCheck:SetCheck( nil , .T. ,  )   //{"Si","No",""} )
   //oBrwPrgs:aCols[ 1 ]:aEditListBound:= { .T. , .F. }

   ADD TO oBrwPrgs HEADER "Nombre"      DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 1 ] SIZE 280 //CENTER
   ADD TO oBrwPrgs HEADER "Size"        DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 2 ] SIZE  80 RIGHT
   ADD TO oBrwPrgs HEADER "Fecha"       DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 3 ] SIZE  80 CENTER
   ADD TO oBrwPrgs HEADER "Descripcion" DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 4 ] SIZE 300 //CENTER


   oBrwPrgs:nMarqueeStyle := MARQSTYLE_HIGHLROW  //CELL      //HIGHLROW
   oBrwPrgs:nRowHeight    := 18
   oBrwPrgs:bClrSel       := { || { CLR_WHITE, CLR_BLUE } }
   oBrwPrgs:lFooter       := .T.
   oBrwPrgs:bLDblClick    := {|| ChangeCheck( oBrwPrgs,  ) } // DOBLE CLICK
   oBrwPrgs:bKeyDown      := {|nKey| if ( nKey == VK_SPACE ,; // Solo ESPACIO
                                                       ChangeCheck( oBrwPrgs,  ),  ) }

 


Code: Select all  Expand view

Function ChangeCheck( oBrw , nCol )
//? oBrw:nRowSel, oBrw:nColSel
nCol   := if( empty( nCol ), 1 , nCol )

//if oBrw:lRecordSelector
//   nCol++
//endif
//if oBrw:nColSel = nCol
   if Len( oBrw:aArrayData ) > 0
      if oBrw:aArrayData[oBrw:nArrayAt, 5] == .F.
         oBrw:aArrayData[oBrw:nArrayAt, 5] := .T.
      else
         oBrw:aArrayData[oBrw:nArrayAt, 5] := .F.
      endif
      oBrw:Refresh()
   endif
//endif
Return nil

 


Gracias de nuevo y un saludo
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6504
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse - SetCheck

Postby nageswaragunupudi » Mon Apr 15, 2013 9:01 pm

Above code can be simplified as:
Code: Select all  Expand view
@ 0,0 XBROWSE oBrwPrgs SIZE 300,180 PIXEL OF oFld:aDialogs[ 1 ] ;
   ARRAY aPrgs ;
   COLUMNS 5, 1, 2, 3, 4 ;
   HEADERS "S", "Nombre", "Size", "Fetcha", "Description" ;
   COLSIZES 18, 260, 80, 80, 300 ;
   JUSTIFY  AL_CENTER, nil, AL_RIGHT, AL_CENTER ;
   FOOTERS LINES NOBORDER
   
WITH OBJECT oBrwPrgs
   :s:SetCheck( nil, .f. )
   :Nombre:bFooter   := { || "Total Ficheros: " + LTrim( Str( oBrwPrgs:nLen ) ) }
   :nMarqueeStyle    := MARQSTYLE_HIGHLROW
   :nRowHeight       := 18
   :bClrSel          := { || { CLR_WHITE, CLR_BLUE } }
   :bLDblClick       := { || If( oBrwPrgs:nLen > 0, oBrwPrgs:S:VarPut( ! oBrwPrgs:S:Value ), nil ) }
   :bKeyDown         := { |nKey| if ( nKey == VK_SPACE .and. oBrwPrgs:nLen > 0, ;
                           oBrwPrgs:S:VarPut( ! oBrwPrgs:S:Value ), nil ) }
   //
   :CreateFromCode()
END  
Regards

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

Re: XBrowse - SetCheck

Postby cnavarro » Mon Apr 15, 2013 9:47 pm

Mr. Rao, its code is fabulous
Excuse my poor English (google translator)
But, when I press SPACE while the CheckBox column, I get the following error:

Code: Select all  Expand view

   Time from start: 0 hours 0 mins 26 secs
   Error occurred at: 15/04/2013, 23:36:08
   Error description: Error BASE/1004  Message not found: NIL:SELECTALL
   Args:
     [   1] = U  

Stack Calls
===========
   Called from:  => __ERRRT_SBASE( 0 )
   Called from: ../../../tobject.prg => NIL:ERROR( 0 )
   Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
   Called from: ../../../tobject.prg => NIL:MSGNOTFOUND( 0 )
   Called from: ../../../tobject.prg => NIL:SELECTALL( 0 )
   Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:EDIT( 10618 )
   Called from: vmh.prg => (b)BUILDSOURCE( 580 )
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:KEYDOWN( 2616 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:KEYDOWN( 1019 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:KEYDOWN( 2201 )
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:KEYDOWN( 2620 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:KEYDOWN( 1019 )
   Called from: .\source\classes\TGET.PRG => TGET:KEYDOWN( 1016 )
   Called from:  => TWINDOW:HANDLEEVENT( 0 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1700 )
   Called from: .\source\classes\TGET.PRG => TGET:HANDLEEVENT( 579 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3159 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 270 )
   Called from: vmh.prg => MAIN( 223 )
Variables in use
================
   Procedure     Type   Value
   ==========================
   __ERRRT_SBASE
     Param   1:    O    Class: ERROR
   NIL:ERROR
     Param   1:    N    13
     Param   2:    N    1004
     Param   3:    C    "Message not found"
     Param   4:    C    "NIL:SELECTALL"
     Param   5:    N    1
     Param   6:    U    
     Local   1:    U    
     Local   2:    U    
   (b)HBOBJECT
     Param   1:    C    "Message not found"
     Param   2:    C    "NIL"
     Param   3:    C    "SELECTALL"
     Param   4:    N    1004
   NIL:MSGNOTFOUND
     Param   1:    U    
     Param   2:    C    "SELECTALL"
   NIL:SELECTALL
     Param   1:    C    "SELECTALL"
   TXBRWCOLUMN:EDIT
   (b)BUILDSOURCE
     Param   1:    N    32
     Local   1:    O    Class: TXBRWCOLUMN
     Local   2:    A    Len:    2
     Local   3:    L    .T.
     Local   4:    C    ""
     Local   5:    N    76
     Local   6:    N    25
     Local   7:    N    14
     Local   8:    N    14
     Local   9:    N    4
     Local  10:    N    2081424959
     Local  11:    L    .T.
     Local  12:    L    .F.
     Local  13:    O    Class: TFONT
   TWINDOW:KEYDOWN
     Param   1:    N    32
     Param   2:    N    3735553
   TCONTROL:KEYDOWN
     Param   1:    N    32
     Param   2:    N    3735553
     Local   1:    U    
   TXBROWSE:KEYDOWN
     Param   1:    N    32
     Param   2:    N    3735553
     Local   1:    U    
   TWINDOW:KEYDOWN
     Param   1:    N    32
     Param   2:    N    3735553
     Local   1:    U    
   TCONTROL:KEYDOWN
     Param   1:    N    32
     Param   2:    N    3735553
     Local   1:    U    
   TGET:KEYDOWN
     Param   1:    N    32
     Param   2:    N    3735553
     Local   1:    U    
   TWINDOW:HANDLEEVENT
     Param   1:    N    32
     Param   2:    N    3735553
     Local   1:    O    Class: TGET
     Local   2:    U    
     Local   3:    U    
     Local   4:    U    
     Local   5:    N    -1
     Local   6:    U    
   TCONTROL:HANDLEEVENT
     Param   1:    N    256
     Param   2:    N    32
     Param   3:    N    3735553
   TGET:HANDLEEVENT
     Param   1:    N    256
     Param   2:    N    32
     Param   3:    N    3735553
     Local   1:    U    
   _FWH
     Param   1:    N    256
     Param   2:    N    32
     Param   3:    N    3735553
     Local   1:    U    
   DIALOGBOXINDIRECT
     Param   1:    N    3735553
     Param   2:    N    256
     Param   3:    N    32
     Param   4:    N    3735553
     Param   5:    N    126
     Local   1:    O    Class: TGET
.../...

 

Pressing SPACE or doubleclick on any column other than the checkbox on the editing get the letter [F] or [T] and not bitmap .
Use the version 3.12
Thanks for your interest[
greetings
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6504
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse - SetCheck

Postby joseluisysturiz » Tue Apr 16, 2013 12:40 am

A mi me hace el cambio ubicado en cualquier columna, sean pulsando ESPACIO, DOBLE CLICK, etc...voy probar la opcion de nageswaragunupudi haber que tal, saludos... :shock:
Dios no está muerto...

Gracias a mi Dios ante todo!
User avatar
joseluisysturiz
 
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela

Re: XBrowse - SetCheck

Postby nageswaragunupudi » Tue Apr 16, 2013 3:58 am

Mr Cnavarro

I am sorry for the mistake. I have edited and made corrections to the code above.
I changed :setcheck(), :bLDClick and :bKeyDown.
Please copy the code again and try. I tested this and it works.
Regards

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

Re: XBrowse - SetCheck

Postby cnavarro » Tue Apr 16, 2013 10:32 am

joseluisysturiz wrote:A mi me hace el cambio ubicado en cualquier columna, sean pulsando ESPACIO, DOBLE CLICK, etc...voy probar la opcion de nageswaragunupudi haber que tal, saludos... :shock:

Jose luis
Que version de FWH estás usando?
Gracias
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6504
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse - SetCheck

Postby cnavarro » Wed Apr 17, 2013 6:27 pm

nageswaragunupudi wrote:Mr Cnavarro

I am sorry for the mistake. I have edited and made corrections to the code above.
I changed :setcheck(), :bLDClick and :bKeyDown.
Please copy the code again and try. I tested this and it works.


Mr. Rao
Funciona Ok las modificaciones que ha realizado
Mis preguntas:
Por que ha cambiado SetCheck( nil, .F. ) ?
Cómo puedo editar solamente la columna Descripcion con Enter o Doubleclick?

Muchas gracias por su ayuda y su tiempo


Mr. Rao
Works Ok the changes you have made
My questions:
What has changed SetCheck (nil,. F.)?
How I can edit only the Description column with Enter or Doubleclick?

Thank you very much for your help and your time
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6504
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse - SetCheck

Postby nageswaragunupudi » Thu Apr 18, 2013 2:37 am

Using oCol:CheckToggle() method is a much simpler way to toggle the logical value.
I show the use of it in the revised sample at the end.

What has changed SetCheck (nil,. F.)?


When second parameter is set to .t. , the columns :nEditType is automatically set to EDIT_GET. I disabled it because anyway we are toggling the value directly.
But it is desirable to keep it .T. and I restored it now. oCol:CheckToggle() works only when this is set to .t.

How I can edit only the Description column with Enter or Doubleclick?


Just enable edit of Description column.
Code: Select all  Expand view
oBrwPrgs:Description:nEditType := EDIT_GET

You can edit the column with Enter or Double Click when the user is on this cell.
Double click on the column overrides global double click.

Because you are highlighting the entire row, the user does not know which column is selected. For this add this line:
Code: Select all  Expand view
  oBrwPrgs:bClrRowFocus     := { || { CLR_BLACK, RGB( 120,210,255 ) } }
 


Now the full code:
Code: Select all  Expand view
  local oDlg, oFont, oBrwPrgs
   local aPrgs

   aPrgs := { ;
      { "One", "Two", "Three", "Four", .t. }, ;
      { "Five", "Six", "Seven", "Eight", .f. } }

   DEFINE DIALOG oDlg SIZE 620,400 PIXEL


@ 0,0 XBROWSE oBrwPrgs SIZE 300,180 PIXEL OF oFld:aDialogs[ 1 ] ;
   ARRAY aPrgs ;
   COLUMNS 5, 1, 2, 3, 4 ;
   HEADERS "S", "Nombre", "Size", "Fetcha", "Description" ;
   COLSIZES 18, 150, 70, 70, 300 ;
   JUSTIFY  AL_CENTER, nil, AL_RIGHT, AL_CENTER ;
   FOOTERS LINES NOBORDER

WITH OBJECT oBrwPrgs
   :s:SetCheck( nil, .t. )
   :Description:nEditType := EDIT_GET
   :Nombre:bFooter   := { || "Total Ficheros: " + LTrim( Str( oBrwPrgs:nLen ) ) }
   :nMarqueeStyle    := MARQSTYLE_HIGHLROW
   :bClrRowFocus     := { || { CLR_BLACK, RGB( 120,210,255 ) } }
   :nRowHeight       := 18
   :bClrSel          := { || { CLR_WHITE, CLR_BLUE } }
   :bLDblClick       := { || If( oBrwPrgs:nLen > 0, oBrwPrgs:S:CheckToggle(), nil ) }
   :bKeyDown         := { |nKey| if ( nKey == VK_SPACE .and. oBrwPrgs:nLen > 0,  oBrwPrgs:S:CheckToggle(), nil ) }          //
   :CreateFromCode()
END
 
Regards

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

Re: XBrowse - SetCheck

Postby cnavarro » Sun Apr 21, 2013 8:20 pm

Buenas noches Mr. Rao
He estado probando el codigo que ha enviado y funciona OK, muchas gracias
No he podido probar el cambio de Font al editar la columna, no funciona

Adjunto el codigo que he usado, y en el que al ejecutar obtengo el siguiente error:
Le agradezco de antemano cualquier ayuda.
Code: Select all  Expand view

function HazElBrw( oFld , nDlg , aArray )
Local oBrw

 @ 0,0 XBROWSE oBrw SIZE 300,180 PIXEL OF oFld:aDialogs[ nDlg ] ;
   ARRAY aArray ;
   COLUMNS 5, 1, 2, 3, 4 ;
   HEADERS "S", "Nombre", "Size", "Fecha", "Descripcion" ;
   COLSIZES 20, 280, 80, 80, 304 ;
   JUSTIFY  AL_CENTER, nil, AL_RIGHT, AL_CENTER , nil ;
   FOOTERS NOBORDER     //LINES

   WITH OBJECT oBrw

      :nombre:nHeadStrAlign      := AL_CENTER
      :size:nHeadStrAlign        := AL_CENTER
      :fecha:nHeadStrAlign       := AL_CENTER
      :descripcion:nHeadStrAlign := AL_CENTER

      :s:SetCheck( nil, .T. )
     
      :l2007            := .F.
      :nMarqueeStyle    := MARQSTYLE_HIGHLROW
      :nRowHeight       := 18
      :bClrSel          := { || { CLR_WHITE, CLR_BLUE } }
      :bClrRowFocus     := { || { CLR_BLACK, RGB( 120,210,255 ) } }
      :bLDblClick       := { || If( oBrw:nLen > 0, oBrw:S:CheckToggle(), nil ) }
      :bKeyDown         := { |nKey| if ( nKey == VK_SPACE .and. oBrw:nLen > 0,;
                                       oBrw:S:CheckToggle(), nil ) }

      :Nombre:nEditype   := 5 //EDIT_GET_BUTTON      //EDIT_BUTTON                               // Linea ERROR
      :Nombre:bEditBlock := { || MsgInfo("Ok","Accion") }
      :Nombre:bFooter   := { || "Total Ficheros: " + ;
                             IF( !empty( oBrw:aArrayData[ oBrw:nArrayAt ][ 1 ] ), ;
                             LTrim( Str( oBrw:nLen ) ) , " 0" ) }
     
      :Descripcion:nEditType    := EDIT_GET
      :Descripcion:cEditPicture := "@!"
      :Descripcion:bClrEdit     := { || { CLR_BLUE , CLR_WHITE } }
      :Descripcion:oEditFont := OClone( oFontEdt )

      :CreateFromCode()

   END

   oFld:aDialogs[ nDlg ]:SetControl( oBrw )

Return oBrw
 


Este es el error en tiempo de ejecucion
Code: Select all  Expand view


   Time from start: 0 hours 0 mins 0 secs
   Error occurred at: 21/04/2013, 21:52:45
   Error description: Error BASE/1005  Message not found: TXBRWCOLUMN:_NEDITYPE
   Args:
     [   1] = O   TXBRWCOLUMN

Stack Calls
===========
   Called from:  => __ERRRT_SBASE( 0 )
   Called from: ../../../tobject.prg => TXBRWCOLUMN:ERROR( 0 )
   Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
   Called from: ../../../tobject.prg => TXBRWCOLUMN:MSGNOTFOUND( 0 )
   Called from: ../../../tobject.prg => TXBRWCOLUMN:_NEDITYPE( 0 )
   Called from: vmh.prg => HAZELBRW( 586 )
   Called from: vmh.prg => MAIN( 202 )

 

Gracias y un saludo

Good evening Mr. Rao
I've been testing the code you sent and it works OK, thank you very much
I could not test the change of Font when editing the column does not work

Attached the code I've used, and in which the run I get the following error
I thank you in advance for any help.

Thanks and regards
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6504
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse - SetCheck

Postby nageswaragunupudi » Mon Apr 22, 2013 9:29 am

In this line
Code: Select all  Expand view
    :Nombre:nEditype   := 5 //EDIT_GET_BUTTON      //EDIT_BUTTON                              

it should be :nEditType
not
:nEditype
Regards

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

Re: XBrowse - SetCheck

Postby cnavarro » Mon Apr 22, 2013 4:55 pm

Thanks
Excuse the error.
There are days that we should not take the computer
We have before the error, look a hundred times and do not see
A greeting
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6504
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse - SetCheck

Postby nageswaragunupudi » Mon Apr 22, 2013 4:57 pm

We have before the error, look a hundred times and do not see

This happens to all of us.
Regards

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


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 30 guests