views:

280

answers:

6

I know it's a minor annoyance.. but it's still an annoyance and it baffles me.. About 3 months ago I was using VS 2008 and when I went to the "Properties" tab there was the little lightning bolt for events(in design mode). Then it suddenly went away.. about a week later I discovered that if I didn't have the properties tab "stickied", then the events thing would be there, but not when its stickied.

This morning all of this was working fine. Now today I went to add an event, and suddenly the little lightning bolt icon is no longer there. I can not see any option disabling and it disappeared without me doing any reconfiguration.. Even without restarting VS. And I have tried restarting VS to no avail..

What am I missing here? Is this a highly annoying bug in VS 2008(its up to date) or am I missing some configuration?

Update I'm attaching a bounty to this question to see if I can get something a bit more helpful. In short it seems like the event tab will appear and disappear on a month or two cycle. And it's not a context problem. I have my cursor inside of a button for instance and I can edit all the properties of the button yet the events tab does not show up... More confusing is that yet again, this was working a few weeks ago

alt text

+1  A: 

I think that lightning bolt icon is contextual- if you don't have something with events selected, you won't see it.

Dave Swersky
Well I can select something like a dropdown or anything else which I know has events and it doesn't appear.
Earlz
+1  A: 

There is a known bug in Visual Studio 2008 where it will not display the events button for ASP.Net controls within an asp:Table control. The workaround from Microsoft:

Use regular <table> and <tr> and <td> tags and mark them as runat="server". This will give you the ability to modify them in code and the designer will give you acccess to the properties and events on the button.


If this is not the case for you, try these troubleshooting steps:

  1. Try deleting the .user and .suo files (located in the same folder as your solution).

  2. If that does not help: Does this occur in other projects/solutions, or just the one? Does it occur when loading the same project/solution on a different computer with a similar setup?

    If it always happens on your computer but not others, it may be that some important file is corrupt - try reinstalling VS (and perhaps, unfortunately, even Windows).

    If it happens in the same solution on other computers, but not in different solutions, the solution/project/designer files may be corrupt. Narrow it down to one of those, and recreate the offender (it may also be a bug similar to the one above, in which case all you can do is submit a bug report and wait...)

    If neither or both... well, something super-screwy is going on!

BlueRaja - Danny Pflughoeft
hmm.. maybe it is the table bit which would explain it being sporadic. I have tried deleting .user and such files and it happens on different projects also so that's not it. I have tried reinstalling VS before.. I am really not in the position to reinstall Windows though and other than this problem my Windows Vista is running really great.
Earlz
Ok just tested it and this happens in the markup without a table being defined.
Earlz
@Earlz: So can you reproduce this on other computers? If so, could you post the reproduction steps (or post a small solution in which this occurs)?
BlueRaja - Danny Pflughoeft
@Blue I don't have other computers with Visual Studio around me that I can actively use for this.
Earlz
+1  A: 

Where is your Properties Button? That's missing too on yours. They might be related. And why do you have <BUTTON>? Mine doesn't look quite like yours.

Here what my Properties pane looks like (VS 2008):

alt text

Edit:

Did you try Reset Menu Layout from the File->Window menu:

alt text

In Class Diagram mode on my computer I don't get the Properties Button or the Events Button:

alt text

I only seem to get the Properties Button and the Events Button from within Design Mode:

alt text

There's also this right-click menu:

alt text

JohnB
I have tried resetting the window layout before.. didn't help. and yes very weird that it says `<BUTTON>` instead of the actual class name..
Earlz
+1  A: 

This might sound crazy but if you are using a Microsoft wireless mouse. Try unplugging the dongle... Does it re-appear? You can now plug it back in and it will be fine until you restart VS.

I had that very problem. Had my properties window disappearing too.

Was driving me crazy and took me months to work out. As for a fix, I didn't find a permanent one. But there were rumours it was specific to Microsoft mice (and keyboards? too maybe)

Kohan
Did this work? :)
Kohan
not using a wireless mouse
Earlz
Odd, i was almost sure that was it. Did you try unplugging the mouse anyway?
Kohan
A: 

I don't know why this problem occurs, but the solution is just 2 clicks away.

The reason for not seeing the event tab is because there 2 multiple entries in the dropdownlist (marked with a questionmark in your picture). The one will be from the type ASP:net button and the other is , as seen on the picture, just button.

The solution is to pick the other btnLocate button from the drop down list. There you have full access to the events.

citronas
+1  A: 
Jimmy
This is exactly the fix. Switching to designer and back into source view fixes it every time. Thanks and congrats on a +425 :)
Earlz
He said restarting visual studio did not fix it. Restarting VS will resync the source view...
BlueRaja - Danny Pflughoeft
@BlueRaja - it won't get synced until the designer is first loaded, so restarting VS and then opening the HTML editor will still not show the Events tab :)
Jimmy