How to display form windows and controls that are having base classes

forum.cdk (2000-2005) & forum.td.cdk (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

How to display form windows and controls that are having base classes

Post by NewsgroupServer » 11 Aug 2008, 15:01

 Posted by:  Andreas Noll 

Hello,

I will try to show form windows and dialogs from our source code in an own
application like it is done in the TD5.1 layout tab. But every control that
will get its properties from a base class is not shown correct.
For example, I have a base class for a push button with a width of 0.3. If I
put a push button on a form that is derived from that class and do not
change its width (class default), the following sample will not show the
button with the proper width.

Set bRet = CDK_App.InitFromFile ( 'myformwithbutton.apl' )
!
Set nIdx = 0
If CDK_App.EnumTopLevelWindows ( sTopLevelWindows ) > 0
While CDK_App.Find ( aItem, sTopLevelWindows[nIdx], TRUE )
If aItem.GetItemType( ) = CDK_IT_FormWindow
If objDesignWindow.InitializeFromObject ( aItem )
Call frmMain.CreateDesignWindow ( objDesignWindow )
Set nIdx = nIdx + 1

-> frmMain is derived from cdkNotifyForm.

How can this be done? We need such a function for making it easier to our
tranlators to localize our applications.
Thanks for any help!!

kind regards
Andreas

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

How to display form windows and controls that are having base classes

Post by NewsgroupServer » 11 Aug 2008, 18:57

 Posted by:  Jeff Luther 

I don't have an immediate answer to your CDK question below (I have used the
CDK a lot, but not to do what you want), but, that said...

Are you aware that Unify ships with Team Dev. an "Object Nationalizer"
utility (file in your TD install directory: CNI51.EXE) ? That's precisely
what that utility is for: "making it easier to our tranlators to localize
our applications."

- Jeff @ Unify

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

How to display form windows and controls that are having base classes

Post by NewsgroupServer » 13 Aug 2008, 08:59

 Posted by:  Andreas Noll 

Hello,

I've found the solution by myself.
The only thing you need to to after you've loaded the source file is calling
the RefreshLibrarys function of the CDK_App! Then the framework is loading
all included .apl files and the base classes.

However, thanks for your attention.

kind regards
Andreas

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

How to display form windows and controls that are having base classes

Post by NewsgroupServer » 13 Aug 2008, 18:21

 Posted by:  Jeff Luther 

Glad you found it and thanks for letting us know.

- Jeff

Return to “td.cdk”

Who is online

Users browsing this forum: Ccbot [Crawler] and 1 guest