Página 1 de 1

suggestion: lRequired (new property)

Publicado: Lun May 23, 2022 2:24 pm
por Hurricane
Hi Team,

Could you please add this new property to 7 types of controls? (T*MaskEdit, T*Memo...). I promise not to ask for anything else (this semester :P )
This new native property will be extremely useful for anyone who wants to create utility routines to validate and make the code cleaner.

Xailer would just display the property in the Object Inspector and nothing else. The programmer would be responsible for any use of this property and creating the necessary logic.

Of course I can create the controls with that, but it would be a step towards de-characterizing the Xailer for something so simple and important for any system.
xailer_property_required.png
xailer_property_required.png (16.63 KiB) Visto 763 veces
regards,

Re: suggestion: lRequired (new property)

Publicado: Mié May 25, 2022 11:27 am
por jfgimenez
Hi,

you may use this code in your own component's dll, just where you're calling RegisterComponent():

Código: Seleccionar todo

XA_ObjAddProperty( TEdit(), "lRequired", .F. )
This code adds the property "lRequired" to the TEdit class and all of its descendants, and you'll see it in the object inspector

Re: suggestion: lRequired (new property)

Publicado: Mié May 25, 2022 1:22 pm
por Hurricane
Hi,
I tested and everything works.
thanks.
jfgimenez escribió: Mié May 25, 2022 11:27 am you may use this code in your own component's dll, just where you're calling RegisterComponent():

Código: Seleccionar todo

XA_ObjAddProperty( TEdit(), "lRequired", .F. )
This code adds the property "lRequired" to the TEdit class and all of its descendants, and you'll see it in the object inspector
regards,