468,537 Members | 1,555 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,537 developers. It's quick & easy.

How to display comments for each enum entry?

How to display comments for each enum entry?

'Enum example with commnents commented

Private Enum MyEnum
YourName =1 ' Set this to get your real name
YourAge=2 ' Set this to get your real age
YourNationality=3 ' Set this to retrieve your real nationality
End Enum

'Program extract
....
GetInfoString(YourName

' I want a tooltip to show the text "Set this to get your real name" to
show when I select one of MyEnum entries
' please note that I am speaking about the IDE, not about the running
program
Thanks

Nov 20 '05 #1
4 5226
* NewAlias <Ne******@NewDomain.com> scripsit:
How to display comments for each enum entry?

'Enum example with commnents commented

Private Enum MyEnum
YourName =1 ' Set this to get your real name
YourAge=2 ' Set this to get your real age
YourNationality=3 ' Set this to retrieve your real nationality
End Enum

'Program extract
...
GetInfoString(YourName

' I want a tooltip to show the text "Set this to get your real name"
to show when I select one of MyEnum entries

' please note that I am speaking about the IDE, not about the running
program


For VB.NET 2002/2003:

My XML Comments FAQ:

VB Commenter
<URL:http://www.gotdotnet.com/team/ide/>
-> section "VB Commenter"

XML Documentation
<URL:http://www.gotdotnet.com/team/vb/>
-> section "XML Documentation"

VBXC - VB.NET XML Commentor
<URL:http://vbxmldoc.tor-erik.net/>

NDOC (formerly DOC.NET)
<URL:http://ndoc.sourceforge.net/>

VB.DOC
<URL:http://vb-doc.sourceforge.net/>

<URL:http://www.gotdotnet.com/Community/Workspaces/Workspace.aspx?id=112b5449-f702-46e2-87fa-86bdf39a17dd>

XML comments will be introduced to VB.NET in version 2005 ("Whidbey").

C# XML comments:

<URL:http://msdn.microsoft.com/library/en-us/csref/html/vclrfTagsForDocumentationComments.asp>

\\\

''' <summary>
''' Colors.
''' </summary>
Public Enum Colors

''' <summary>
''' Yellow.
''' </summary>
Yellow

''' <summary>
''' Blue.
''' </summary>
Blue
End Enum
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
I thank you very much for taking your time to repply
Can you tell me if there is any built-in attribute that allows to
display the comments?

I am not sure if my question was clear, it is not easy to explain anyway.

I will try another aproach:

I am looking for a built-in feature, kind of attribute???? to display
user enum tooltips similar to what you get when selecting a color to
complete the following line:

dim x as Brush=brushes.

as you type the '.' a list appears
when you use the cursors to browse the list a tooltip appears explaining
the meaning of each highlighted item

for instance, if you have AliceBlue highlighted the tooltip will display:

"Public Shared ReadOnly AliceBlue() As System.Drawing.Brush
Gets a system-defined System.Drawing.Brush object."

Completing the line:

dim x as Brush=Brushes.AliceBlue

When you move the mouse over the word AliceBlue, the tooltip displays:
Public Shared ReadOnly AliceBlue() As System.Drawing.Brush

I am not sure if my explanation is clear.
Herfried K. Wagner [MVP] wrote:
* NewAlias <Ne******@NewDomain.com> scripsit:
How to display comments for each enum entry?

'Enum example with commnents commented

Private Enum MyEnum
YourName =1 ' Set this to get your real name YourAge=2 ' Set this to get your real age
YourNationality=3 ' Set this to retrieve your real nationality
End Enum

'Program extract
...
GetInfoString(YourName

' I want a tooltip to show the text "Set this to get your real name"
to show when I select one of MyEnum entries

' please note that I am speaking about the IDE, not about the running
program

For VB.NET 2002/2003:

My XML Comments FAQ:

VB Commenter
<URL:http://www.gotdotnet.com/team/ide/>
-> section "VB Commenter"

XML Documentation
<URL:http://www.gotdotnet.com/team/vb/>
-> section "XML Documentation"

VBXC - VB.NET XML Commentor
<URL:http://vbxmldoc.tor-erik.net/>

NDOC (formerly DOC.NET)
<URL:http://ndoc.sourceforge.net/>

VB.DOC
<URL:http://vb-doc.sourceforge.net/>

<URL:http://www.gotdotnet.com/Community/Workspaces/Workspace.aspx?id=112b5449-f702-46e2-87fa-86bdf39a17dd>

XML comments will be introduced to VB.NET in version 2005 ("Whidbey").

C# XML comments:

<URL:http://msdn.microsoft.com/library/en-us/csref/html/vclrfTagsForDocumentationComments.asp>

\\\

''' <summary>
''' Colors.
''' </summary>
Public Enum Colors

''' <summary>
''' Yellow.
''' </summary>
Yellow

''' <summary>
''' Blue.
''' </summary>
Blue
End Enum
///


Nov 20 '05 #3
* NewAlias <Ne******@NewDomain.com> scripsit:
I thank you very much for taking your time to repply
Can you tell me if there is any built-in attribute that allows to
display the comments?
AFAIK, no.
I am not sure if my question was clear, it is not easy to explain anyway.

I will try another aproach:

I am looking for a built-in feature, kind of attribute???? to display
user enum tooltips similar to what you get when selecting a color to
complete the following line:


Have a look at the links I posted previously. You will have to create
an XML file out of XML comments (or by hand) and name this file
"Foo.dll.xml", assuming your DLL's name is "Foo.dll". VS.NET will use
this file to load the tooltips.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4
OK :(

Thanks for your help

Herfried K. Wagner [MVP] wrote:
* NewAlias <Ne******@NewDomain.com> scripsit:
I thank you very much for taking your time to repply
Can you tell me if there is any built-in attribute that allows to
display the comments?

AFAIK, no.

I am not sure if my question was clear, it is not easy to explain anyway.

I will try another aproach:

I am looking for a built-in feature, kind of attribute???? to display
user enum tooltips similar to what you get when selecting a color to
complete the following line:

Have a look at the links I posted previously. You will have to create
an XML file out of XML comments (or by hand) and name this file
"Foo.dll.xml", assuming your DLL's name is "Foo.dll". VS.NET will use
this file to load the tooltips.


Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Pjotr Wedersteers | last post: by
1 post views Thread by Shawn Melton | last post: by
8 posts views Thread by Klaus Schneider | last post: by
21 posts views Thread by Andreas Huber | last post: by
1 post views Thread by Rhy Mednick | last post: by
3 posts views Thread by Ray Cassick \(Home\) | last post: by
reply views Thread by Control Freq | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.