How can i get the toolbar's reference?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How can i get the toolbar's reference?

  1. #1
    Join Date
    Apr 2004
    Posts
    1

    How can i get the toolbar's reference?

    I have written a programm about Mdi . the toolbar belogs to the parent form. when i click one button in the child form , i want to use the parent's reference of the toolbar . but can i do ?
    hope anyone's help.
    best regards!

  2. #2
    Join Date
    Apr 2004
    Posts
    50
    You can simply create a public property in parent window code
    something like that:

    'in parent.vb

    ' I'm not sure about the path to the toolbar component so check it first

    public readonly propety myToolBar as window.form.toolbar
    get
    return me.toolbar1
    end get
    end property

    'in your form
    'you need a reference to your parnt window:
    ' 1)you can get through me.parentwindow if i'm not wrong
    ' 2)but I would recommend you to store a referense to all your windows includng parent one somewhere in shared file in form of shared objects

    private sub some_sub
    mObjParent.myToolbar.WHATEVER
    ....
    end sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center