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.
Assign Color value to oDBEdit/oDBEditMask Object
-
- Mensajes: 257
- Registrado: Mié Jul 19, 2006 8:48 am
Assign Color value to oDBEdit/oDBEditMask Object
How can I assign a nClrText value depend on the value of a database
field, with a DBNavigator on the form ie different records will be
displayed.
e.g. in DBFData5 sample, how could I change the colour of first name to
clRed if one is married ?
I lost this attribute (ability to change colour) when I focus on this
field ?! In what event(s) should I place
::oDBEdit1:nClrText := if( ::oDbfDataSet1:Married, clRed, clBlue) ??
field, with a DBNavigator on the form ie different records will be
displayed.
e.g. in DBFData5 sample, how could I change the colour of first name to
clRed if one is married ?
I lost this attribute (ability to change colour) when I focus on this
field ?! In what event(s) should I place
::oDBEdit1:nClrText := if( ::oDbfDataSet1:Married, clRed, clBlue) ??
- ignacio
- Site Admin
- Mensajes: 9441
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Assign Color value to oDBEdit/oDBEditMask Object
David,
Use the oDataSet:OnPostChange Event:
IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is created
after the Dataset
::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
ENDIF
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"david fung" <davfung@yahoo.com> escribió en el mensaje
news:[email=451a85dd@news.xailer.com...]451a85dd@news.xailer.com...[/email]
> How can I assign a nClrText value depend on the value of a database field,
> with a DBNavigator on the form ie different records will be displayed.
>
> e.g. in DBFData5 sample, how could I change the colour of first name to
> clRed if one is married ?
>
> I lost this attribute (ability to change colour) when I focus on this
> field ?! In what event(s) should I place
>
> ::oDBEdit1:nClrText := if( ::oDbfDataSet1:Married, clRed, clBlue) ??
Use the oDataSet:OnPostChange Event:
IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is created
after the Dataset
::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
ENDIF
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"david fung" <davfung@yahoo.com> escribió en el mensaje
news:[email=451a85dd@news.xailer.com...]451a85dd@news.xailer.com...[/email]
> How can I assign a nClrText value depend on the value of a database field,
> with a DBNavigator on the form ie different records will be displayed.
>
> e.g. in DBFData5 sample, how could I change the colour of first name to
> clRed if one is married ?
>
> I lost this attribute (ability to change colour) when I focus on this
> field ?! In what event(s) should I place
>
> ::oDBEdit1:nClrText := if( ::oDbfDataSet1:Married, clRed, clBlue) ??
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
Assign Color value to oDBEdit/oDBEditMask Object
David,
Use the oDataSet:OnPostChange Event:
IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is created
after the Dataset
::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
ENDIF
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"david fung" <davfung@yahoo.com> escribió en el mensaje
news:[email=451a85dd@news.xailer.com...]451a85dd@news.xailer.com...[/email]
> How can I assign a nClrText value depend on the value of a database field,
> with a DBNavigator on the form ie different records will be displayed.
>
> e.g. in DBFData5 sample, how could I change the colour of first name to
> clRed if one is married ?
>
> I lost this attribute (ability to change colour) when I focus on this
> field ?! In what event(s) should I place
>
> ::oDBEdit1:nClrText := if( ::oDbfDataSet1:Married, clRed, clBlue) ??
Use the oDataSet:OnPostChange Event:
IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is created
after the Dataset
::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
ENDIF
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"david fung" <davfung@yahoo.com> escribió en el mensaje
news:[email=451a85dd@news.xailer.com...]451a85dd@news.xailer.com...[/email]
> How can I assign a nClrText value depend on the value of a database field,
> with a DBNavigator on the form ie different records will be displayed.
>
> e.g. in DBFData5 sample, how could I change the colour of first name to
> clRed if one is married ?
>
> I lost this attribute (ability to change colour) when I focus on this
> field ?! In what event(s) should I place
>
> ::oDBEdit1:nClrText := if( ::oDbfDataSet1:Married, clRed, clBlue) ??
-
- Mensajes: 257
- Registrado: Mié Jul 19, 2006 8:48 am
Assign Color value to oDBEdit/oDBEditMask Object
Ignacio Ortiz de Zúñiga wrote:
> David,
>
> Use the oDataSet:OnPostChange Event:
>
> IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is created
> after the Dataset
> ::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
> ::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
> ENDIF
>
> Regards,
Great, thank you Ignacio.
But it didn't work for the first record displayed. Anywhere else should
this code be placed ?
David
> David,
>
> Use the oDataSet:OnPostChange Event:
>
> IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is created
> after the Dataset
> ::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
> ::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
> ENDIF
>
> Regards,
Great, thank you Ignacio.
But it didn't work for the first record displayed. Anywhere else should
this code be placed ?
David
-
- Mensajes: 257
- Registrado: Mié Jul 19, 2006 8:48 am
Assign Color value to oDBEdit/oDBEditMask Object
Ignacio Ortiz de Zúñiga wrote:
> David,
>
> Use the oDataSet:OnPostChange Event:
>
> IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is created
> after the Dataset
> ::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
> ::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
> ENDIF
>
> Regards,
Great, thank you Ignacio.
But it didn't work for the first record displayed. Anywhere else should
this code be placed ?
David
> David,
>
> Use the oDataSet:OnPostChange Event:
>
> IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is created
> after the Dataset
> ::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
> ::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
> ENDIF
>
> Regards,
Great, thank you Ignacio.
But it didn't work for the first record displayed. Anywhere else should
this code be placed ?
David
-
- Mensajes: 257
- Registrado: Mié Jul 19, 2006 8:48 am
Assign Color value to oDBEdit/oDBEditMask Object
david fung wrote:
> Ignacio Ortiz de Zúñiga wrote:
>> David,
>>
>> Use the oDataSet:OnPostChange Event:
>>
>> IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is
>> created after the Dataset
>> ::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
>> ::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
>> ENDIF
>>
>> Regards,
>
Great, thank you Ignacio.
But it didn't work for the first record displayed. Anywhere else should
this code be placed ?
Any idea for the first record ?
> Ignacio Ortiz de Zúñiga wrote:
>> David,
>>
>> Use the oDataSet:OnPostChange Event:
>>
>> IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is
>> created after the Dataset
>> ::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
>> ::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
>> ENDIF
>>
>> Regards,
>
Great, thank you Ignacio.
But it didn't work for the first record displayed. Anywhere else should
this code be placed ?
Any idea for the first record ?
-
- Mensajes: 257
- Registrado: Mié Jul 19, 2006 8:48 am
Assign Color value to oDBEdit/oDBEditMask Object
david fung wrote:
> Ignacio Ortiz de Zúñiga wrote:
>> David,
>>
>> Use the oDataSet:OnPostChange Event:
>>
>> IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is
>> created after the Dataset
>> ::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
>> ::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
>> ENDIF
>>
>> Regards,
>
Great, thank you Ignacio.
But it didn't work for the first record displayed. Anywhere else should
this code be placed ?
Any idea for the first record ?
> Ignacio Ortiz de Zúñiga wrote:
>> David,
>>
>> Use the oDataSet:OnPostChange Event:
>>
>> IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is
>> created after the Dataset
>> ::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
>> ::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
>> ENDIF
>>
>> Regards,
>
Great, thank you Ignacio.
But it didn't work for the first record displayed. Anywhere else should
this code be placed ?
Any idea for the first record ?
- ignacio
- Site Admin
- Mensajes: 9441
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Assign Color value to oDBEdit/oDBEditMask Object
David,
Just call the same code on the OnInitialize form event.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"david fung" <davfung@yahoo.com> escribió en el mensaje
news:[email=451b8e7f@news.xailer.com...]451b8e7f@news.xailer.com...[/email]
> david fung wrote:
>> Ignacio Ortiz de Zúñiga wrote:
>>> David,
>>>
>>> Use the oDataSet:OnPostChange Event:
>>>
>>> IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is
>>> created after the Dataset
>>> ::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
>>> ::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
>>> ENDIF
>>>
>>> Regards,
>>
>
> Great, thank you Ignacio.
>
> But it didn't work for the first record displayed. Anywhere else should
> this code be placed ?
>
> Any idea for the first record ?
>
Just call the same code on the OnInitialize form event.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"david fung" <davfung@yahoo.com> escribió en el mensaje
news:[email=451b8e7f@news.xailer.com...]451b8e7f@news.xailer.com...[/email]
> david fung wrote:
>> Ignacio Ortiz de Zúñiga wrote:
>>> David,
>>>
>>> Use the oDataSet:OnPostChange Event:
>>>
>>> IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is
>>> created after the Dataset
>>> ::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
>>> ::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
>>> ENDIF
>>>
>>> Regards,
>>
>
> Great, thank you Ignacio.
>
> But it didn't work for the first record displayed. Anywhere else should
> this code be placed ?
>
> Any idea for the first record ?
>
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
Assign Color value to oDBEdit/oDBEditMask Object
David,
Just call the same code on the OnInitialize form event.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"david fung" <davfung@yahoo.com> escribió en el mensaje
news:[email=451b8e7f@news.xailer.com...]451b8e7f@news.xailer.com...[/email]
> david fung wrote:
>> Ignacio Ortiz de Zúñiga wrote:
>>> David,
>>>
>>> Use the oDataSet:OnPostChange Event:
>>>
>>> IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is
>>> created after the Dataset
>>> ::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
>>> ::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
>>> ENDIF
>>>
>>> Regards,
>>
>
> Great, thank you Ignacio.
>
> But it didn't work for the first record displayed. Anywhere else should
> this code be placed ?
>
> Any idea for the first record ?
>
Just call the same code on the OnInitialize form event.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"david fung" <davfung@yahoo.com> escribió en el mensaje
news:[email=451b8e7f@news.xailer.com...]451b8e7f@news.xailer.com...[/email]
> david fung wrote:
>> Ignacio Ortiz de Zúñiga wrote:
>>> David,
>>>
>>> Use the oDataSet:OnPostChange Event:
>>>
>>> IF ::oDbEdit1 != NIL // necessary since the control oDBEdit1 is
>>> created after the Dataset
>>> ::oDbEdit1:nClrPane := if( oSender:Married, clRed, clBlue)
>>> ::oDbEdit1:nClrPaneFocus := if( oSender:Married, clRed, clBlue)
>>> ENDIF
>>>
>>> Regards,
>>
>
> Great, thank you Ignacio.
>
> But it didn't work for the first record displayed. Anywhere else should
> this code be placed ?
>
> Any idea for the first record ?
>
-
- Mensajes: 257
- Registrado: Mié Jul 19, 2006 8:48 am
Assign Color value to oDBEdit/oDBEditMask Object
Ignacio Ortiz de Zúñiga wrote:
> David,
>
> Just call the same code on the OnInitialize form event.
>
> Regards,
>
Thank you for your help, it could be a simple task, but still struggling
with all these OOP !
> David,
>
> Just call the same code on the OnInitialize form event.
>
> Regards,
>
Thank you for your help, it could be a simple task, but still struggling
with all these OOP !
-
- Mensajes: 257
- Registrado: Mié Jul 19, 2006 8:48 am
Assign Color value to oDBEdit/oDBEditMask Object
Ignacio Ortiz de Zúñiga wrote:
> David,
>
> Just call the same code on the OnInitialize form event.
>
> Regards,
>
Thank you for your help, it could be a simple task, but still struggling
with all these OOP !
> David,
>
> Just call the same code on the OnInitialize form event.
>
> Regards,
>
Thank you for your help, it could be a simple task, but still struggling
with all these OOP !