Hi,
I want to set the OnDrawCell event handling on the fly for TbrColumn object. When I set it
in the IDE, the generated code looks like this:
WITH OBJECT TArrayBrwColumn():New( ::oDBBrowse1 )
:cHeader := "Column1"
:cFooter := "Spolu"
:nWidth := 129
:nFooterImage := 10
:OnDrawCell := "RowColoring"
:Create()
END
and works fine.
The displayed dataset in the oDbfBrowse2 is dynamically changed by user, so I don't know
at the design time, which columns will be displayed, but I want to set the OnDrawCell
event, therefore I try:
METHOD FormInitialize( oSender ) CLASS TForm2
AEVAL(::oDbfBrowse2:aCols,{|x| x:OnDrawCell := "RowColoring"})
RETURN Nil
Executing the FormInitialize() method I get this error:
******************************* Error log file ********************************
Date: 16.05.2007
Time: 13:32:15
Available Memory: 147364
Current Area: 2
---------------------------- Compiler Information -----------------------------
Xailer Version: Xailer 1.3.2 Version 1.3b
Compiler: xHarbour build 0.99.61 Intl. (SimpLex) PCode Version: 7
C/C++ Compiler: Borland C++ 5.5.1
Windows Platform: Windows XP Professional 5.01.2600 Service Pack 2
--------------------- Internal Error Handling Information ---------------------
Subsystem Call: BASE
System Code: 1004
Default Status: .F.
Description: No exported method
Operation: RowColoring
Arguments:
Involved File:
Dos Error Code: 0
Trace Through:
(b)TFORM2:FORMINITIALIZE (50)
AEVAL (0)
TFORM2:FORMINITIALIZE (50)
TFORM2:ONINITIALIZE (0)
TFORM2:NEW (183)
TFORM1:OPTIONLIST2ITEM1CLICK (104)
TOPTIONITEM:ONCLICK (0)
TOPTIONITEM:CLICK (273)
TOPTIONLIST:WMLBUTTONDOWN (0)
RUNFORM (0)
TAPPLICATION:RUN (208)
MAIN (17)
***************************************************
It isn't possible set this event after the control is created?
Gejza Horvath
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
TbrwColumn event setting after create()
-
- Mensajes: 281
- Registrado: Mar Ago 15, 2006 1:50 pm
- ignacio
- Site Admin
- Mensajes: 9466
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
TbrwColumn event setting after create()
Gejza,
>
> The displayed dataset in the oDbfBrowse2 is dynamically changed by user,
> so I don't know at the design time, which columns will be displayed, but I
> want to set the OnDrawCell
Take a look at method TBrowse:ColAtIndex()
> AEVAL(::oDbfBrowse2:aCols,{|x| x:OnDrawCell := "RowColoring"})
Check the method RowColoring is defined on your TFORM??? module.
If is definded maybe is not working due the use of a code-block on the
OnDrawCell asignment of the event. Try to do the same job without AEVAL() or
do the following:
AEVAL(::oDbfBrowse2:aCols,{|x| x:OnDrawCell := {|oCol|
oCol:oParent:RowColoring()})
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Gejza Horvath" <_hsoftkn@nextra.sk> escribió en el mensaje
news:[email=464aed3b@ozsrv2.ozlan.local...]464aed3b@ozsrv2.ozlan.local...[/email]
> Hi,
>
> I want to set the OnDrawCell event handling on the fly for TbrColumn
> object. When I set it in the IDE, the generated code looks like this:
>
> WITH OBJECT TArrayBrwColumn():New( ::oDBBrowse1 )
> :cHeader := "Column1"
> :cFooter := "Spolu"
> :nWidth := 129
> :nFooterImage := 10
> :OnDrawCell := "RowColoring"
> :Create()
> END
> and works fine.
>
> The displayed dataset in the oDbfBrowse2 is dynamically changed by user,
> so I don't know at the design time, which columns will be displayed, but I
> want to set the OnDrawCell event, therefore I try:
>
> METHOD FormInitialize( oSender ) CLASS TForm2
> AEVAL(::oDbfBrowse2:aCols,{|x| x:OnDrawCell := "RowColoring"})
> RETURN Nil
>
> Executing the FormInitialize() method I get this error:
>
> ******************************* Error log file
> ********************************
>
> Date: 16.05.2007
> Time: 13:32:15
> Available Memory: 147364
> Current Area: 2
>
> ---------------------------- Compiler
> Information -----------------------------
>
> Xailer Version: Xailer 1.3.2 Version 1.3b
> Compiler: xHarbour build 0.99.61 Intl. (SimpLex) PCode Version: 7
> C/C++ Compiler: Borland C++ 5.5.1
> Windows Platform: Windows XP Professional 5.01.2600 Service Pack 2
>
> --------------------- Internal Error Handling
> Information ---------------------
>
> Subsystem Call: BASE
> System Code: 1004
> Default Status: .F.
> Description: No exported method
> Operation: RowColoring
> Arguments:
> Involved File:
> Dos Error Code: 0
>
> Trace Through:
> (b)TFORM2:FORMINITIALIZE (50)
> AEVAL (0)
> TFORM2:FORMINITIALIZE (50)
> TFORM2:ONINITIALIZE (0)
> TFORM2:NEW (183)
> TFORM1:OPTIONLIST2ITEM1CLICK (104)
> TOPTIONITEM:ONCLICK (0)
> TOPTIONITEM:CLICK (273)
> TOPTIONLIST:WMLBUTTONDOWN (0)
> RUNFORM (0)
> TAPPLICATION:RUN (208)
> MAIN (17)
> ***************************************************
>
> It isn't possible set this event after the control is created?
>
>
> Gejza Horvath
>
>
>
> The displayed dataset in the oDbfBrowse2 is dynamically changed by user,
> so I don't know at the design time, which columns will be displayed, but I
> want to set the OnDrawCell
Take a look at method TBrowse:ColAtIndex()
> AEVAL(::oDbfBrowse2:aCols,{|x| x:OnDrawCell := "RowColoring"})
Check the method RowColoring is defined on your TFORM??? module.
If is definded maybe is not working due the use of a code-block on the
OnDrawCell asignment of the event. Try to do the same job without AEVAL() or
do the following:
AEVAL(::oDbfBrowse2:aCols,{|x| x:OnDrawCell := {|oCol|
oCol:oParent:RowColoring()})
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Gejza Horvath" <_hsoftkn@nextra.sk> escribió en el mensaje
news:[email=464aed3b@ozsrv2.ozlan.local...]464aed3b@ozsrv2.ozlan.local...[/email]
> Hi,
>
> I want to set the OnDrawCell event handling on the fly for TbrColumn
> object. When I set it in the IDE, the generated code looks like this:
>
> WITH OBJECT TArrayBrwColumn():New( ::oDBBrowse1 )
> :cHeader := "Column1"
> :cFooter := "Spolu"
> :nWidth := 129
> :nFooterImage := 10
> :OnDrawCell := "RowColoring"
> :Create()
> END
> and works fine.
>
> The displayed dataset in the oDbfBrowse2 is dynamically changed by user,
> so I don't know at the design time, which columns will be displayed, but I
> want to set the OnDrawCell event, therefore I try:
>
> METHOD FormInitialize( oSender ) CLASS TForm2
> AEVAL(::oDbfBrowse2:aCols,{|x| x:OnDrawCell := "RowColoring"})
> RETURN Nil
>
> Executing the FormInitialize() method I get this error:
>
> ******************************* Error log file
> ********************************
>
> Date: 16.05.2007
> Time: 13:32:15
> Available Memory: 147364
> Current Area: 2
>
> ---------------------------- Compiler
> Information -----------------------------
>
> Xailer Version: Xailer 1.3.2 Version 1.3b
> Compiler: xHarbour build 0.99.61 Intl. (SimpLex) PCode Version: 7
> C/C++ Compiler: Borland C++ 5.5.1
> Windows Platform: Windows XP Professional 5.01.2600 Service Pack 2
>
> --------------------- Internal Error Handling
> Information ---------------------
>
> Subsystem Call: BASE
> System Code: 1004
> Default Status: .F.
> Description: No exported method
> Operation: RowColoring
> Arguments:
> Involved File:
> Dos Error Code: 0
>
> Trace Through:
> (b)TFORM2:FORMINITIALIZE (50)
> AEVAL (0)
> TFORM2:FORMINITIALIZE (50)
> TFORM2:ONINITIALIZE (0)
> TFORM2:NEW (183)
> TFORM1:OPTIONLIST2ITEM1CLICK (104)
> TOPTIONITEM:ONCLICK (0)
> TOPTIONITEM:CLICK (273)
> TOPTIONLIST:WMLBUTTONDOWN (0)
> RUNFORM (0)
> TAPPLICATION:RUN (208)
> MAIN (17)
> ***************************************************
>
> It isn't possible set this event after the control is created?
>
>
> Gejza Horvath
>
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
-
- Mensajes: 281
- Registrado: Mar Ago 15, 2006 1:50 pm
TbrwColumn event setting after create()
Ignacio,
thanks, this code does the job:
FOR i := 1 TO LEN(::oDbfBrowse2:aCols)
::oDbfBrowse2:aCols:OnDrawCell := "RowColoring"
NEXT
Gejza Horvath
"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> pí¹e v diskusním pøíspìvku
news:464b13cd$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Gejza,
>
>>
>> The displayed dataset in the oDbfBrowse2 is dynamically changed by user, so I don't
>> know at the design time, which columns will be displayed, but I want to set the
>> OnDrawCell
>
> Take a look at method TBrowse:ColAtIndex()
>
>> AEVAL(::oDbfBrowse2:aCols,{|x| x:OnDrawCell := "RowColoring"})
>
> Check the method RowColoring is defined on your TFORM??? module.
>
> If is definded maybe is not working due the use of a code-block on the OnDrawCell
> asignment of the event. Try to do the same job without AEVAL() or do the following:
>
> AEVAL(::oDbfBrowse2:aCols,{|x| x:OnDrawCell := {|oCol| oCol:oParent:RowColoring()})
>
> Regards,
>
> --
> Ignacio Ortiz de Zúñiga
> http://www.xailer.com
>
>
> "Gejza Horvath" <_hsoftkn@nextra.sk> escribió en el mensaje
> news:[email=464aed3b@ozsrv2.ozlan.local...]464aed3b@ozsrv2.ozlan.local...[/email]
>> Hi,
>>
>> I want to set the OnDrawCell event handling on the fly for TbrColumn object. When I set
>> it in the IDE, the generated code looks like this:
>>
>> WITH OBJECT TArrayBrwColumn():New( ::oDBBrowse1 )
>> :cHeader := "Column1"
>> :cFooter := "Spolu"
>> :nWidth := 129
>> :nFooterImage := 10
>> :OnDrawCell := "RowColoring"
>> :Create()
>> END
>> and works fine.
>>
>> The displayed dataset in the oDbfBrowse2 is dynamically changed by user, so I don't
>> know at the design time, which columns will be displayed, but I want to set the
>> OnDrawCell event, therefore I try:
>>
>> METHOD FormInitialize( oSender ) CLASS TForm2
>> AEVAL(::oDbfBrowse2:aCols,{|x| x:OnDrawCell := "RowColoring"})
>> RETURN Nil
>>
>> Executing the FormInitialize() method I get this error:
>>
>> ******************************* Error log file ********************************
>>
>> Date: 16.05.2007
>> Time: 13:32:15
>> Available Memory: 147364
>> Current Area: 2
>>
>> ---------------------------- Compiler Information -----------------------------
>>
>> Xailer Version: Xailer 1.3.2 Version 1.3b
>> Compiler: xHarbour build 0.99.61 Intl. (SimpLex) PCode Version: 7
>> C/C++ Compiler: Borland C++ 5.5.1
>> Windows Platform: Windows XP Professional 5.01.2600 Service Pack 2
>>
>> --------------------- Internal Error Handling Information ---------------------
>>
>> Subsystem Call: BASE
>> System Code: 1004
>> Default Status: .F.
>> Description: No exported method
>> Operation: RowColoring
>> Arguments:
>> Involved File:
>> Dos Error Code: 0
>>
>> Trace Through:
>> (b)TFORM2:FORMINITIALIZE (50)
>> AEVAL (0)
>> TFORM2:FORMINITIALIZE (50)
>> TFORM2:ONINITIALIZE (0)
>> TFORM2:NEW (183)
>> TFORM1:OPTIONLIST2ITEM1CLICK (104)
>> TOPTIONITEM:ONCLICK (0)
>> TOPTIONITEM:CLICK (273)
>> TOPTIONLIST:WMLBUTTONDOWN (0)
>> RUNFORM (0)
>> TAPPLICATION:RUN (208)
>> MAIN (17)
>> ***************************************************
>>
>> It isn't possible set this event after the control is created?
>>
>>
>> Gejza Horvath
>>
>>
>
>
>
thanks, this code does the job:
FOR i := 1 TO LEN(::oDbfBrowse2:aCols)
::oDbfBrowse2:aCols:OnDrawCell := "RowColoring"
NEXT
Gejza Horvath
"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> pí¹e v diskusním pøíspìvku
news:464b13cd$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Gejza,
>
>>
>> The displayed dataset in the oDbfBrowse2 is dynamically changed by user, so I don't
>> know at the design time, which columns will be displayed, but I want to set the
>> OnDrawCell
>
> Take a look at method TBrowse:ColAtIndex()
>
>> AEVAL(::oDbfBrowse2:aCols,{|x| x:OnDrawCell := "RowColoring"})
>
> Check the method RowColoring is defined on your TFORM??? module.
>
> If is definded maybe is not working due the use of a code-block on the OnDrawCell
> asignment of the event. Try to do the same job without AEVAL() or do the following:
>
> AEVAL(::oDbfBrowse2:aCols,{|x| x:OnDrawCell := {|oCol| oCol:oParent:RowColoring()})
>
> Regards,
>
> --
> Ignacio Ortiz de Zúñiga
> http://www.xailer.com
>
>
> "Gejza Horvath" <_hsoftkn@nextra.sk> escribió en el mensaje
> news:[email=464aed3b@ozsrv2.ozlan.local...]464aed3b@ozsrv2.ozlan.local...[/email]
>> Hi,
>>
>> I want to set the OnDrawCell event handling on the fly for TbrColumn object. When I set
>> it in the IDE, the generated code looks like this:
>>
>> WITH OBJECT TArrayBrwColumn():New( ::oDBBrowse1 )
>> :cHeader := "Column1"
>> :cFooter := "Spolu"
>> :nWidth := 129
>> :nFooterImage := 10
>> :OnDrawCell := "RowColoring"
>> :Create()
>> END
>> and works fine.
>>
>> The displayed dataset in the oDbfBrowse2 is dynamically changed by user, so I don't
>> know at the design time, which columns will be displayed, but I want to set the
>> OnDrawCell event, therefore I try:
>>
>> METHOD FormInitialize( oSender ) CLASS TForm2
>> AEVAL(::oDbfBrowse2:aCols,{|x| x:OnDrawCell := "RowColoring"})
>> RETURN Nil
>>
>> Executing the FormInitialize() method I get this error:
>>
>> ******************************* Error log file ********************************
>>
>> Date: 16.05.2007
>> Time: 13:32:15
>> Available Memory: 147364
>> Current Area: 2
>>
>> ---------------------------- Compiler Information -----------------------------
>>
>> Xailer Version: Xailer 1.3.2 Version 1.3b
>> Compiler: xHarbour build 0.99.61 Intl. (SimpLex) PCode Version: 7
>> C/C++ Compiler: Borland C++ 5.5.1
>> Windows Platform: Windows XP Professional 5.01.2600 Service Pack 2
>>
>> --------------------- Internal Error Handling Information ---------------------
>>
>> Subsystem Call: BASE
>> System Code: 1004
>> Default Status: .F.
>> Description: No exported method
>> Operation: RowColoring
>> Arguments:
>> Involved File:
>> Dos Error Code: 0
>>
>> Trace Through:
>> (b)TFORM2:FORMINITIALIZE (50)
>> AEVAL (0)
>> TFORM2:FORMINITIALIZE (50)
>> TFORM2:ONINITIALIZE (0)
>> TFORM2:NEW (183)
>> TFORM1:OPTIONLIST2ITEM1CLICK (104)
>> TOPTIONITEM:ONCLICK (0)
>> TOPTIONITEM:CLICK (273)
>> TOPTIONLIST:WMLBUTTONDOWN (0)
>> RUNFORM (0)
>> TAPPLICATION:RUN (208)
>> MAIN (17)
>> ***************************************************
>>
>> It isn't possible set this event after the control is created?
>>
>>
>> Gejza Horvath
>>
>>
>
>
>