custom UserControl with Proprety named "ReadOnly" in VB.NET

  • Thread starter Thread starter Marcin Floryan
  • Start date Start date
M

Marcin Floryan

I am creating a custom control (Inherits UserControl) and my control
containt a TextBox control. TextBox control has a Property called
"ReadOnly". I would like to expose this property outside my own control, but
it seems impossible because when I write:

Public Property ReadOnly() as Boolean
....

The compilter treats ReadOnly as a Modifier and does not allow this
contruct. Can I expose a property of my control under a different name (so I
would create a property "_ReadOnly" and expose it as "ReadOnly")

It is very important for me to have a property called "ReadOnly" in my
control (excatly like TextBox does) to have a coherent code.

Any clues?

Regards,
Marcin Floryan
 
Hi

Public property [ReadOnly]() as boolean

Ke
--------------------

----- Marcin Floryan wrote: ----

I am creating a custom control (Inherits UserControl) and my contro
containt a TextBox control. TextBox control has a Property calle
"ReadOnly". I would like to expose this property outside my own control, bu
it seems impossible because when I write

Public Property ReadOnly() as Boolea
...

The compilter treats ReadOnly as a Modifier and does not allow thi
contruct. Can I expose a property of my control under a different name (so
would create a property "_ReadOnly" and expose it as "ReadOnly"

It is very important for me to have a property called "ReadOnly" in m
control (excatly like TextBox does) to have a coherent code

Any clues

Regards
Marcin Florya
 
Back
Top