Print Page | Close Window

Retrieve ParentControl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=18299
Printed Date: 09 June 2025 at 3:26pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Retrieve ParentControl
Posted By: synectic
Subject: Retrieve ParentControl
Date 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




Replies:
Posted By: gibra
Date Posted: 04 May 2011 at 4:36am


-------------
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
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


Posted By: synectic
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net