dcsimg
Results 1 to 8 of 8

Thread: [RESOLVED] listbox usercontrol

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    499

    Resolved [RESOLVED] listbox usercontrol

    I made a listbox usercontrol for myself with a few added functions but never did anything to the actual control itself (graphics etc), because of that someone suggested why didnt i do it as a control wrapper.

    how do you do a control wrapper and how does it connect to a normal listbox ?

    thanks.
    Last edited by user name; Aug 29th, 2005 at 03:48 AM.

  2. #2
    Lurker
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,651

    Re: listbox usercontrol

    A controll wrapper is basically a Usercontrol containing the control you are wrapping, in this case the listbox. You expose most or all of the properties and methods of the wrapped control manually and can add your own in the Usercontrol code.

    How did you do it, all from scratch? That does afford you more customisability, but it's harder.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    499

    Re: listbox usercontrol

    Correct me if im wrong but isnt this what i have done, please see attachment.

    thank you.
    Attached Files Attached Files

  4. #4
    Lurker
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,651

    Re: listbox usercontrol

    Yup, that's exactly it

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    499

    Re: listbox usercontrol

    Sorry for the dumb questions but its a new field for me but

    are you saying that when i do a usercontrol without doing anything to the control itself (just add more functionality) its called a control wrapper ?

    thanks for your help.

  6. #6
    Lurker
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,651

    Re: listbox usercontrol

    Indeed. If you have a control within your control and the purpose of your control is to extend the other control, but not actually modify it, then you have created a control wrapper

    Same with class wrappers. Class containing an instance of another class or a reference to a control. The work is done through the wrapper class instead of the wrapped class/control.

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    499

    Re: listbox usercontrol

    Thats great.

    Thank you for your time penagate.

  8. #8
    Lurker
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,651

    Re: [RESOLVED] listbox usercontrol

    Any time

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width