Author | Topic: Re: XbpCheckbox() in XbpBrowse() | |
---|---|---|
Paul Chong | Re: XbpCheckbox() in XbpBrowse() on Fri, 16 May 2014 06:15:14 +0800 On Thu, 15 Dec 2005 23:17:27 +0100, J.A. Diego Kerejeta wrote: Hi, Column 6 is using XbpCheckColumn. How to change hilite bg color similar to column 1-5? Regards. >> I'm looking for a snippet code showing how to include XBPCheckBox in >> XBPBrowse. >> > > Perhaps too late, but here you have an sample > > Regards > > Diego Screenshot 2014-05-16 04.17.34.png | |
Jose Antonio Diego Kereje | Re: XbpCheckbox() in XbpBrowse() on Sat, 17 May 2014 00:39:00 +0200 Hi, The code is too old, but... ************************************ CLASS XbpCheckColumn FROM XbpColumn ************************************ EXPORTED: VAR DatalinkCheck INLINE METHOD init( oParent, oOwner, aPos, aSize, aPP, lVisible ) ***************************************************************** ::XbpColumn:init( oParent, oOwner, aPos, aSize, aPP, lVisible ) ::dataArea:= XbpCheckCellGroup():new( self ) ::dataArea:datalinkCheck:= ::datalinkCheck RETURN self INLINE METHOD RefreshRows( nFirtsRow, nLastRow ) ************************************************ ::dataArea:lEraseChecks:= .T. ::XbpColumn:refreshRows( nFirtsRow, nLastRow ) RETURN self ENDCLASS Regards. Diego --- Este mensaje no contiene virus ni malware porque la protección de avast! Antivirus está activa. http://www.avast.com Test.png | |
Paul Chong | Re: XbpCheckbox() in XbpBrowse() on Sun, 18 May 2014 16:02:24 +0800 On Sat, 17 May 2014 00:39:00 +0200, Jose Antonio Diego Kereje wrote: Hello Diego, Thank you, it works accordingly. I just cannot understand why did i miss it everytime i look at the code. > Hi, > > The code is too old, but... > > ************************************ > CLASS XbpCheckColumn FROM XbpColumn > ************************************ > EXPORTED: > VAR DatalinkCheck > > INLINE METHOD init( oParent, oOwner, aPos, aSize, aPP, lVisible ) > ***************************************************************** > ::XbpColumn:init( oParent, oOwner, aPos, aSize, aPP, lVisible ) > ::dataArea:= XbpCheckCellGroup():new( self ) > ::dataArea:datalinkCheck:= ::datalinkCheck > RETURN self > > INLINE METHOD RefreshRows( nFirtsRow, nLastRow ) > ************************************************ > ::dataArea:lEraseChecks:= .T. > ::XbpColumn:refreshRows( nFirtsRow, nLastRow ) > RETURN self > ENDCLASS > > Regards. Diego > > --- > Este mensaje no contiene virus ni malware porque la protección de avast! Antivirus está activa. > http://www.avast.com | |
Paul Chong | Re: XbpCheckbox() in XbpBrowse() on Mon, 19 May 2014 13:40:50 +0800 On Sat, 17 May 2014 00:39:00 +0200, Jose Antonio Diego Kereje wrote: Houston, we have another problem. The XbpCheckColumn column when click to change no longer update the fields, F_CHECK. > Hi, > > The code is too old, but... > > ************************************ > CLASS XbpCheckColumn FROM XbpColumn > ************************************ > EXPORTED: > VAR DatalinkCheck > > INLINE METHOD init( oParent, oOwner, aPos, aSize, aPP, lVisible ) > ***************************************************************** > ::XbpColumn:init( oParent, oOwner, aPos, aSize, aPP, lVisible ) > ::dataArea:= XbpCheckCellGroup():new( self ) > ::dataArea:datalinkCheck:= ::datalinkCheck > RETURN self > > INLINE METHOD RefreshRows( nFirtsRow, nLastRow ) > ************************************************ > ::dataArea:lEraseChecks:= .T. > ::XbpColumn:refreshRows( nFirtsRow, nLastRow ) > RETURN self > ENDCLASS > > Regards. Diego > > --- > Este mensaje no contiene virus ni malware porque la protección de avast! Antivirus está activa. > http://www.avast.com | |
Jose Antonio Diego Kereje | Re: XbpCheckbox() in XbpBrowse() on Tue, 20 May 2014 10:02:14 +0200 Paul, ************************************ CLASS XbpCheckColumn FROM XbpColumn ************************************ EXPORTED: VAR DatalinkCheck INLINE METHOD init( oParent, oOwner, aPos, aSize, aPP, lVisible ) ***************************************************************** ::XbpColumn:init( oParent, oOwner, aPos, aSize, aPP, lVisible ) ::dataArea:= XbpCheckCellGroup():new( self ) RETURN self INLINE METHOD create( oParent, oOwner, aPos, aSize, aPP, lVisible ) ******************************************************************* ::dataArea:datalinkCheck:= ::datalinkCheck ::XbpColumn:create( oParent, oOwner, aPos, aSize, aPP, lVisible ) RETURN self INLINE METHOD RefreshRows( nFirtsRow, nLastRow ) ************************************************ ::dataArea:lEraseChecks:= .T. ::XbpColumn:refreshRows( nFirtsRow, nLastRow ) RETURN self ENDCLASS I also suggest you change this: #define CHECK_ON_MARK Chr( 255 ) '.' #define CHECK_OFF_MARK ' ' ':' Regards. Diego --- Este mensaje no contiene virus ni malware porque la protección de avast! Antivirus está activa. http://www.avast.com | |
Paul Chong | Re: XbpCheckbox() in XbpBrowse() on Fri, 23 May 2014 00:22:31 +0800 On Tue, 20 May 2014 10:02:14 +0200, Jose Antonio Diego Kereje wrote: Hello Diego, Thanks. Everything works accordingly. However, changing the constant endup the text in checkcolumn didnt align. I dont know why you suggest to change it but since it doesnt works so i use back the existing constant. Regards Paul > I also suggest you change this: > > > #define CHECK_ON_MARK Chr( 255 ) '.' > #define CHECK_OFF_MARK ' ' ':' > | |
Paul Chong | Re: XbpCheckbox() in XbpBrowse() on Fri, 23 May 2014 00:25:18 +0800 | |
Jorge L. Borlando | Re: XbpCheckbox() in XbpBrowse() on Mon, 31 Dec 2018 11:34:18 -0300 Hi Diego the problem that I find and still can not solve in this example is that when I move with the keyboard, the checkbox is not selected according to the row in which I am positioned which makes when you press the <space> key, it selects the last checkbox that you click with the mouse Could you help me with this? Best regards, happy new year Hola Diego el problema que encuentro y aún no puedo resolver en este ejemplo es que cuando me desplazo con el teclado, el checkbox no se selecciona conforme a la fila en que estoy posicionado lo que hace que cuando apriete la tecla <espacio>, esta seleccione el último checkbox que pique con el mouse podrías ayudarme en esto ?, saludos cordiales y feliz año nuevo "Jose Antonio Diego Kereje" wrote in message news:fe9e5de$7a8336d6$164cbc@news.alaska-software.com... > Hi, > > The code is too old, but... > > ************************************ > CLASS XbpCheckColumn FROM XbpColumn > ************************************ > EXPORTED: > VAR DatalinkCheck > > INLINE METHOD init( oParent, oOwner, aPos, aSize, aPP, lVisible ) > ***************************************************************** > ::XbpColumn:init( oParent, oOwner, aPos, aSize, aPP, lVisible ) > ::dataArea:= XbpCheckCellGroup():new( self ) > ::dataArea:datalinkCheck:= ::datalinkCheck > RETURN self > > INLINE METHOD RefreshRows( nFirtsRow, nLastRow ) > ************************************************ > ::dataArea:lEraseChecks:= .T. > ::XbpColumn:refreshRows( nFirtsRow, nLastRow ) > RETURN self > ENDCLASS > > Regards. Diego > > --- > Este mensaje no contiene virus ni malware porque la protección de avast! > Antivirus está activa. > http://www.avast.com > | |
Jorge L. Borlando | Re: XbpCheckbox() in XbpBrowse() on Tue, 01 Jan 2019 11:26:59 -0300 Hi Diego, I define a callback XbpBrowse():keyboard with this function, but I do not finish understanding the behavior of the focus in the xbpcheckbox, that when I use the keyboard generates unwanted selection behaviors Function Mykeyb( nKey, u2, obj ) Local i, oCol, oCheck If ( nKey = xbeK_SPACE ) //.And. obj:isDerivedFrom( 'XbpBrowse' ) ) ForceReadEvents() oCol := obj While ( oCol != NIL .And. !IsMethod( oCol, '_DownCheck' ) ) oCol := oCol:setParent() EndDO If ( oCol != NIL ) oCheck := oCol:ChildList()[oCol:oBrowse:rowPos] SetAppFocus( oCheck ) If ( oCol:datalinkCheck != NIL ) Eval( oCol:datalinkCheck, !oCheck:editBuffer(), NIL, oCol ) EndIF oCol:oBrowse:refreshAll() EndIF EndIF Return ( nKey ) "Jorge L. Borlando" <jlborlando@yahoo.com.ar> wrote in message news:3135866e$72c76934$877f4@news.alaska-software.com... > Hi Diego > the problem that I find and still can not solve in this example > is that when I move with the keyboard, the checkbox is not selected > according to the row in which I am positioned > which makes when you press the <space> key, it selects the last checkbox > that you click with the mouse > > Could you help me with this? Best regards, happy new year > > > Hola Diego > el problema que encuentro y aún no puedo resolver en este ejemplo > es que cuando me desplazo con el teclado, el checkbox no se selecciona > conforme a la fila en que estoy posicionado > lo que hace que cuando apriete la tecla <espacio>, esta seleccione el > último checkbox que pique con el mouse > > podrías ayudarme en esto ?, saludos cordiales y feliz año nuevo > > > "Jose Antonio Diego Kereje" wrote in message > news:fe9e5de$7a8336d6$164cbc@news.alaska-software.com... >> Hi, >> >> The code is too old, but... >> >> ************************************ >> CLASS XbpCheckColumn FROM XbpColumn >> ************************************ >> EXPORTED: >> VAR DatalinkCheck >> >> INLINE METHOD init( oParent, oOwner, aPos, aSize, aPP, lVisible ) >> ***************************************************************** >> ::XbpColumn:init( oParent, oOwner, aPos, aSize, aPP, lVisible ) >> ::dataArea:= XbpCheckCellGroup():new( self ) >> ::dataArea:datalinkCheck:= ::datalinkCheck >> RETURN self >> >> INLINE METHOD RefreshRows( nFirtsRow, nLastRow ) >> ************************************************ >> ::dataArea:lEraseChecks:= .T. >> ::XbpColumn:refreshRows( nFirtsRow, nLastRow ) >> RETURN self >> ENDCLASS >> >> Regards. Diego >> >> --- >> Este mensaje no contiene virus ni malware porque la protección de avast! >> Antivirus está activa. >> http://www.avast.com >> |