Results 1 to 5 of 5

Thread: Inhereted usercontrol.

  1. #1

    Thread Starter
    Fanatic Member Crash893's Avatar
    Join Date
    Dec 2005
    Posts
    930

    Inhereted usercontrol.

    Hey,

    I started playing around with the inherited user controls and i was wondering if there was a way that I could move some of the text boxes and labels from the original user control. basically to give it a more appealing look with the extra controls of the

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Inhereted usercontrol.

    User controls obey exactly the same rules as any other classes and objects. If a member of the base class is private then it can't be accessed, otherwise it can. Of course, the Controls property of every control is public.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member Crash893's Avatar
    Join Date
    Dec 2005
    Posts
    930

    Re: Inhereted usercontrol.

    sooooooo..... yes?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Inhereted usercontrol.

    Soooo... what non-private members are there in the base class that expose those TextBoxes and Labels?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Fanatic Member Crash893's Avatar
    Join Date
    Dec 2005
    Posts
    930

    Re: Inhereted usercontrol.

    I guess im not following this... and ill chalk that up to my very shakey understanding of oop in general.


    this is what im seeing



    i understand that the underlying user control has exposed public properties but im not sure how to make it look like this.




    I understand the adding textboxes but how do i access the properties of the inherited usercontrol from the enveloping control?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width