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 / September 2004

Tip: Looking for answers? Try searching our database.

Object's Form Text or Name?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Rugo - 23 Sep 2004 17:12 GMT
Hi All,
I am trying to figure out how to get an object's Form Name or Text value.

If I have a ListView object called LV1, I want it's Parent Name/Text.
Using the Parent Object will not do because the ListView may be contained
within other objects such as Panels, Groups, or Tab Objects.

Any ideas would be appreciated,
John.
Tim Wilson - 23 Sep 2004 17:36 GMT
What about using the TopLevelControl property?

[C#]
this.listView1.TopLevelControl.Text

Signature

Tim Wilson
.Net Compact Framework MVP

<Feedback>
Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups?  Let us know!
https://www.windowsembeddedeval.com/community/newsgroups
</Feedback>

> Hi All,
> I am trying to figure out how to get an object's Form Name or Text value.
[quoted text clipped - 5 lines]
> Any ideas would be appreciated,
> John.
Imran Koradia - 23 Sep 2004 19:08 GMT
use the LV1.FindForm( ) method (inherited from Control.FindForm( )) - this
returns an instance of the form the control is on. From that, you'll get all
you want regarding the form - name, text, etc

Imran.

> Hi All,
> I am trying to figure out how to get an object's Form Name or Text value.
[quoted text clipped - 5 lines]
> Any ideas would be appreciated,
> John.

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.