
create custom property for textbox!?
I think that its not necessary to create properties to accomplish such
task. You can create a function that sets such visible properties.
Eg:
Function hide_control ( c as control , truefalse as boolean ) as boolean
on error goto hide_control_error
c.enabled = truefalse
c.locked = not truefalse
c.forecolor = iif ( truefalse , 11111 , 16777215 )
hide_control = true
exit sub
hide_control_error :
hide_control = false
end sub
If it happens that you must have different settings for some controls you
can save this settings in the TAG property of the control, in a format
easily understandable.
Quote:
> Hi there,
> I want to create a custom property for a standard textbox or combobox.
The
> property should be a boolean and perform several actions:
> e.g. if I state: me.txtName.Owner = true
> the following should happen with the control:
> me.txtName.enabled = false
> me.txtName.Locked = true
> me.txtName.ForeColor = 16777215
> etc..
> When me.txtName.Owner = false other values should be set for the
properties
> given in this example.
> How do I get to this? I have many textboxes in many places that I want to
> change in an easy way instead of having to give the properties of every
> textbox again and again.
> Thanks in advance,
> Jeroen