Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Retrieve ParentControl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Retrieve ParentControl

 Post Reply Post Reply
Author
Message
synectic View Drop Down
Newbie
Newbie


Joined: 01 April 2011
Location: Berlin, Germany
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote synectic Quote  Post ReplyReply Direct Link To This Post Topic: Retrieve ParentControl
    Posted: 02 May 2011 at 10:00am
EDIT: see below

Hi there,

i build my commandbars dynamically, so i don't know the ids or anything else. There are simple buttons and  popupsplitbuttons.

It looks like this:

Button 1
Button 2
  SubButton 1
  SubButton 2
  ...
Button 3
Button 4
...

So, if 'SubButton 2' is clicked, how can i retrieve its parent 'Button 2' to change the caption from 'button 2' into 'something else'?
I know how to get the commandbar 'Button 2', but i don't know how to get it as a control to manipulate its properties.

Thanks
Andreas

Why does the moderator not moderate?
I posted this reply 36 hours ago:

Hi, gibra,

thanks for your reply. Smile

In Parameter-property i store a 'parameter' which holds the id of an object to be accessed when the button is clicked. The parent is supposed to store the last selected 'subcontrol' for quick access.

So there has to be another way to get the 'Parent-Button'. Confused

Thanks and greetings from Berlin to Italy
Andreas

Back to Top
gibra View Drop Down
Senior Member
Senior Member


Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 288
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibra Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2011 at 4:36am
You can use Parameter property to store the parent button, while add each button to Commandbar.
 
From the help:
Parameter
Gets/Sets the parameter of the control.  This is the equivalent to the "Tag" property.  You can store any extra data needed for your program.
 
Wink
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8
Back to Top
synectic View Drop Down
Newbie
Newbie


Joined: 01 April 2011
Location: Berlin, Germany
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote synectic Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2011 at 5:06am
Hi, gibra,

thanks for your reply. Smile

In Parameter-property i store a 'parameter' which holds the id of an object to be accessed when the button is clicked. The parent is supposed to store the last selected 'subcontrol' for quick access.

So there has to be another way to get the 'Parent-Button'. Confused

Thanks and greetings from Berlin to Italy
Andreas
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.