Retrieve ParentControl |
Post Reply |
Author | |
synectic
Newbie Joined: 01 April 2011 Location: Berlin, Germany Status: Offline Points: 4 |
Post Options
Thanks(0)
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. 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'. Thanks and greetings from Berlin to Italy Andreas |
|
gibra
Senior Member Joined: 31 October 2008 Location: Italy Status: Offline Points: 288 |
Post Options
Thanks(0)
|
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.
|
|
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 |
|
synectic
Newbie Joined: 01 April 2011 Location: Berlin, Germany Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Hi, gibra,
thanks for your reply. 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'. Thanks and greetings from Berlin to Italy Andreas |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |