Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / January 2007

Tip: Looking for answers? Try searching our database.

hiding public methods in the DropdownList.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lucky - 11 Jan 2007 13:36 GMT
hi guys!

again with some interesting Question.

i've some public methods in class. i dont want to show this methods in
the dropdown list while you are typing the code in .net IDE (it long
story that why i dont need those methods in the list).
i guess there are some arrtibutes those can prevent showing method in
the popuped dropdown list but as i dont have much idea about this
attributes, i need your expert help on this.

please let me know if you know how can i do this or may be some other
resource that can help me to find out the way of doing.

thanks,
Lucky
cbmeeks - 11 Jan 2007 13:59 GMT
uh....make then private instead of public??

cbmeeks
http://www.codershangout.com

> hi guys!
>
[quoted text clipped - 12 lines]
> thanks,
> Lucky
Phill W. - 11 Jan 2007 14:02 GMT
> i've some public methods in class. i dont want to show this methods in
> the dropdown list while you are typing the code in .net IDE (it long
> story that why i dont need those methods in the list).

Yes, you can do this but - why would you have /Public/ methods that you
don't want to show to people trying to /use/ your class?

Regards,
   Phill  W.
Stoitcho Goutsev (100) - 11 Jan 2007 15:27 GMT
Phill,

The attribute you are looking for is called EditorBrowsableAttribute

Signature

HTH
Stoitcho Goutsev (100)

>> i've some public methods in class. i dont want to show this methods in
>> the dropdown list while you are typing the code in .net IDE (it long
[quoted text clipped - 5 lines]
> Regards,
>    Phill  W.
Lucky - 11 Jan 2007 15:33 GMT
Hi Phill,
i tried this,

'VB
<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>
Public Sub myHiddenMethod()

End Sub

// C#
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public void myHiddenMethod()
{
}

but unfortunately in c# this attribute fails to hide methods. i dont
know why. i'm still workin on it.

Lucky

> Phill,
>
[quoted text clipped - 13 lines]
> > Regards,
> >    Phill  W.
RobinS - 11 Jan 2007 16:42 GMT
In the VB version below, either it's a typo, or you
need an underscore after the > to indicate continuation.

Robin S.
------------------------------------
> Hi Phill,
> i tried this,
[quoted text clipped - 36 lines]
>> > Regards,
>> >    Phill  W.
Stoitcho Goutsev (100) - 11 Jan 2007 18:17 GMT
Hmm,

I've used this attribute with c# and it worked perfectly for me as far as I
remember.

Signature

Stoitcho Goutsev (100)

> Hi Phill,
> i tried this,
[quoted text clipped - 33 lines]
>> > Regards,
>> >    Phill  W.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.