|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Is someone willing to help me with a simple VB example?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, Try :
http://samples.gotdotnet.com/quickstart/aspplus/doc/webpagelets.aspx http://samples.gotdotnet.com/quickstart/aspplus/doc/webctrlauthoring.aspx Not sure but IMO it would be best to start by yourself and to ask specific questions one by one rather than asking someone else to build a sample that could be not what you wanted... For now I'm not sure if you want to create a user control or if you want to create a new control that inherits from an existing control... Patrice -- Show quoteHide quote"Edwin Knoppert" <n***@hellobasic.com> a écrit dans le message de news:42b042b1$0$17212$ba620dc5@text.nova.planet.nl... > 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, > > 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. Show quoteHide quote "Patrice" <nob***@nowhere.com> schreef in bericht news:eiBPb5bcFHA.1384@TK2MSFTNGP09.phx.gbl... > Try : > http://samples.gotdotnet.com/quickstart/aspplus/doc/webpagelets.aspx > http://samples.gotdotnet.com/quickstart/aspplus/doc/webctrlauthoring.aspx > > Not sure but IMO it would be best to start by yourself and to ask specific > questions one by one rather than asking someone else to build a sample > that > could be not what you wanted... > > For now I'm not sure if you want to create a user control or if you want > to > create a new control that inherits from an existing control... > > Patrice > > -- > > "Edwin Knoppert" <n***@hellobasic.com> a écrit dans le message de > news:42b042b1$0$17212$ba620dc5@text.nova.planet.nl... >> 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, >> >> > > <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 Show quoteHide quote "Edwin Knoppert" wrote: > 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, > > > 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, Show quoteHide quote "Harolds" <Haro***@discussions.microsoft.com> schreef in bericht news:E3F4AE7D-C02B-4FC5-84EC-D7F1E6612F82@microsoft.com... > <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 > > > "Edwin Knoppert" wrote: > >> 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, >> >> >> Add a class to your project.
replace the Public Class line with what I posted. Show quoteHide quote "Edwin Knoppert" wrote: > 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, > > "Harolds" <Haro***@discussions.microsoft.com> schreef in bericht > news:E3F4AE7D-C02B-4FC5-84EC-D7F1E6612F82@microsoft.com... > > <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 > > > > > > "Edwin Knoppert" wrote: > > > >> 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, > >> > >> > >> > > > 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. Show quoteHide quote "Edwin Knoppert" wrote: > 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, > > "Harolds" <Haro***@discussions.microsoft.com> schreef in bericht > news:E3F4AE7D-C02B-4FC5-84EC-D7F1E6612F82@microsoft.com... > > <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 > > > > > > "Edwin Knoppert" wrote: > > > >> 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, > >> > >> > >> > > > 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. Show quoteHide quote "Edwin Knoppert" <n***@hellobasic.com> schreef in bericht news:42b042b1$0$17212$ba620dc5@text.nova.planet.nl... >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, > >
Skin and custom controls (ASP 2.0)
ASP.net datagrid with more than 1 datasource SortCommand and custom headers - why won't they play nice? Dynamically populating and expanding TreeView from button click... Datagrid - How to format EditCommandColumn? Composite Web Control Odd Dropdownlist problem ListBox not firing SelectedIndexChanged (AutoPostBack=True) Panel limitations? Validation Controls checking for a particular value |
|||||||||||||||||||||||