Print Page | Close Window

CXTPCustomizeSheet & Custom Controls

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=15499
Printed Date: 10 May 2024 at 2:41pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPCustomizeSheet & Custom Controls
Posted By: grahamf
Subject: CXTPCustomizeSheet & Custom Controls
Date Posted: 29 October 2009 at 6:18pm
Hi there,

I am evaluating ToolKit Pro 2009 to replace RogueWave's Objective Toolkit.  So far so good.

However I have a question/problem about the ability to add a custom control to the CXTPCustomizeSheet.

First, it seems as though attempting to find the control via GetCommandBars()->FindControl() using xtpControlCustom fails.  Using xtpControlError actually does find (a) control.

Second, adding the control via pControls->AddClone() adds the command entry, but it does not show the command using the (encapsulated) control - it is as though it regards it as a simple menu command.

To show this, I modified the CustomThemes sample, and created a CComboBox control for ID_EDIT_STATE, and wrapped it in a custom control.  It appears fine in the toolbar.

However, when looking at the Test category in the customize Command page, it appears as a simple menu command.  NOTE: of course you need to change the FindControl() to use xtpControlError for the ID_EDIT_STATE control.  Otherwise it will not show up at all.

What do I need to do to get this to work?

Cheers,
Graham



Replies:
Posted By: Oleg
Date Posted: 30 October 2009 at 8:35am
Hi,
 
Yes, CustomControls can't be dragged  from Sheet. What user have see if he drag 2 same custom controls  ?  you still have only one window attached to them.
 
There is way to create control dervied from CXTPControl and manually clone its attached window - see how CXTPControlSlider works.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: grahamf
Date Posted: 30 October 2009 at 9:50am
G'day Oleg,

Ah ok so you derive from CXTPControl if you want that functionality.

As for what the user sees, in our current implementation using RogueWave Objective Toolkit, our application maintains a set of the controls for each unique command ID.  Each control in the set is kept in synchronisation via notifications made back to our mainframe.  Our mainframe ensures that when a signle control is updated, it will update the state of its 'duplicate' controls in that control's set.  There is cleanup code in there also to handle when such a control is removed.

Thanks for the information.

Cheers,
Graham



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