Is someone willing to help me with a simple VB example?

E

Edwin Knoppert

I seen a lot of examples but it doesn't work out since they are in c.

In VWD i want to prepare a usercontrol.
At this time i use a usercontrol and place a textbox upon it.
Not handy, i lose all direct properties, only with wrappers i can reach them
again.
I seen examples (in c) using some kind of ordinary class which wraps a
control to a new classname, ideal!
However i can't seem to make it work.
Could some please write me a downloadable example (complete project zipped
or so) with the following aspects please? :

Textbox new class MyNewTextbox
Property NewValue (get and set)
Evt. to use from the toolbox.
Assuming all existing properties and events are still available in the IDE,
iow i simply want to extend the textbox control.
All in Visual Basic mode, not c :)

I think i can manage it from there

Thanks!!
Edwin,
 
P

Patrice

E

Edwin Knoppert

I'll check but indeed inherit would be the best.
A UC is rather poor, pasting the refer in each aspx and so.
Also the properties is unhandy.
I just need to extend a textbox therefore inherit seems the best option to
me.
 
H

Harolds

<ToolboxData("<{0}:TextBox runat=server></{0}:TextBox>")> Public Class
TextBox : Inherits WebControls.TextBox
Private _AllowEdit As Boolean = True

<Category("TRC"), DefaultValue(True)> Public Property AllowEdit() As Boolean
Get
Return _AllowEdit
End Get
Set(ByVal Value As Boolean)
_AllowEdit = Value
End Set
End Property
 
E

Edwin Knoppert

I have seen such code but never understood how to deal with that.
Save it as a specific filetype?
I really don't know.

I'm using VWB 2005 beta2

Thanks,
 
H

Harolds

Actually you need to create a new project, and a class, put in the code I
posted, build that project, add/remove items to your toolbox, select the dll
that was created when you built the new project.
 
E

Edwin Knoppert

So far the suggestions didn't help, hey it's beta 2 2005, examples are or in
c or older version.
Comon, help me out for this version with a working VB example for a simple
textbox + extra properties ok?
Uncompiled control, like a usercontrol, i don't care if it's in the toolbox
or not.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top