Child objects of Toolbar, Help me, please

forum.cdk (1998-2005) & forum.td.cdk (2005-2010)
Bezrodny Alexander

Child objects of Toolbar, Help me, please

Post by Bezrodny Alexander » 28 Nov 2002, 18:15

 Posted by:  Bezrodny Alexander 

Hi,
In design mode I create form window 'frm1' with Toolbar visible and enable

than I put into toolbar PushButton

In CDK Outline I user next code:

Code: Select all

Call srcObject.InitializeFromObject( CDK_Window )
Set dfClass = srcObject.GetClassName( )
Set ntype = srcObject.GetItemType( )
Set dfObject = srcObject.GetName( )
If srcObject.GetParent( srcObject ) !*** Contents
If srcObject.GetParent( srcObject ) !*** hWndForm
Set dfParent = srcObject.GetName( )
if PushButton into section "Contents" of 'frm1', so it work properly and
dfParent get value 'frm1'

But if PushButton into Toolbar of 'frm1',so dfParent value is null!

I can't get name 'frm1'.

Help me please, How do it?

Frank Boettcher (ITG)

Re: Child objects of Toolbar, Help me, please

Post by Frank Boettcher (ITG) » 28 Nov 2002, 19:17

 Posted by:  Frank \(ITG\) 

Toolbars represent an additional layer, so you have to add:

Code: Select all

If srcObject.GetItemType() = CDK_IT_ToolBar
    ! get another parent
    srcObject.GetParent( srcObject )

Best regards
Frank Boettcher
Ice Tea Group, LLC
www.iceteagroup.com

Bezrodny Alexander

Re: Child objects of Toolbar, Help me, please

Post by Bezrodny Alexander » 29 Nov 2002, 10:29

 Posted by:  Bezrodny Alexander 

Tanks!

Return to “td.cdk”

Who is online

Users browsing this forum: [Ccbot] and 1 guest