Print Page | Close Window

boolean type resource strings

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=2580
Printed Date: 16 May 2024 at 4:06pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: boolean type resource strings
Posted By: tobi
Subject: boolean type resource strings
Date Posted: 15 July 2005 at 10:32am
I´ve just tested the suite´s resource override dll for the boolean property grid values and found that these are not translated in the german resource dll ( XTPResourceDe.dll ). The value for the id 9953 is True\nFalse and should be Ja\nNein.
After I´ve modified the resource dll to the correct values and tried it the initial boolean values are still in english, but the combo box contains the localised strings. Can it be that they are still hardcoded somewhere ?



Replies:
Posted By: Oleg
Date Posted: 16 July 2005 at 6:27am

Yes, sorry, there is bug in CXTPPropertyGridItemBool::_Init.

please move SetBool in this member to the end.

 

void CXTPPropertyGridItemBool::_Init(BOOL bValue)
{
 m_nFlags = xtpGridItemHasComboButton | xtpGridItemHasEdit;

 CString strTrueFalse;
 if (XTPResourceManager()->LoadString(&strTrueFalse, XTP_IDS_PROPERTYGRID_TRUEFALSE)
  && (strTrueFalse.Find(_T('\n')) != -1))
 {
  AfxExtractSubString(m_strTrueText, strTrueFalse, 0);
  AfxExtractSubString(m_strFalseText, strTrueFalse, 1);
 }

 SetBool(bValue);
 m_pConstraints->AddConstraint(m_strTrueText);
 m_pConstraints->AddConstraint(m_strFalseText);

 SetConstraintEdit(TRUE);
 m_strDefaultValue = m_strValue;
}

 

 

or manually call

 

pItem->SetTrueFalseText(_T("Ja"), _T("Nein"));



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


Posted By: tobi
Date Posted: 17 July 2005 at 11:07pm
(How) can I do this in the ActiveX edition ?


Posted By: Oleg
Date Posted: 18 July 2005 at 6:04am
 We will release 9.71 soon, with this fix.

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



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