Groups | Blog | Home
all groups > vb.net controls > february 2004 >

vb.net controls : Problem with Toolbar Custom Control



abi
2/8/2004 9:10:50 PM
Hi,

I created a toolbar control (vb.net) that I want to implement in my windows
app. I was able drag/drop the control and onto my form.

I am however unable to create the buttonclick event handler ...
Private Sub ctlToolBar_Click(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.ToolBarButtonClickEventArgs) Handles
ctlToolBar.buttonclick

the IDE only allows the following as a valid event signature. ANY REASON WHY

Private Sub ctlToolBar_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ctlToolBar.Click

FYI: The control itself is consists of a panel into which the toolbar was
created and a imagelist. No other code exists therein.

Am I missing something? The control that I create is named ctlToolBar on my
form. If you can provide me with sample code to implement the control
correctly on my form, it'll be great! I need to be able to recognize the
button clicked and take approp action.

thanks!

Abhinav

Michael Dobler
2/10/2004 1:06:14 AM
Hi,

since you placed the control inside a usercontrol. So the IDE only gets the
events for the usercontrol. You could either declare the controls inside
your usercontrol as public or -better- define your own events in the
usercontrol and raise them where appropriate.

Mike

"abi" <AbhinavGargye@hotmail.com> schrieb im Newsbeitrag
news:eDAAxHr7DHA.2088@TK2MSFTNGP10.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button