Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » How to change separator in CExtPropertyValueCompund Collapse All
Subject Author Date
Sungsoo Yoon May 15, 2006 - 8:56 PM

Dear

I’d like to change the separator character ’,’ into ’-’ in ExtPropertyValueCompund.
In my application I used CExtPropertyGridCtrl to get a name and the number composed like 123456-1234567.
In getting a name I tried to get surname and given name separately so I used ExtPropertyValueCompund, not ExtPropertyValue.
That is fine! great working.
But I got a problem in handling with the number. I also want to get two number separately and display the number like this "123456-1234567" but now it is displed like this "123456, 1234567"

How can I change the separator character?
Thanks always for your help.

Technical Support May 16, 2006 - 9:52 AM

The separator string used in the property grid control is taken from the Windows system settings (the list separator). This string is typically one character and depends on the current locale. The property grid’s source code queries the list separator string in many places and there is no easy way to replace it with your preferred separator string. The propery grid uses a resource manager wrapper method to get the locale information including the list separator. So, the easiest way is to implement your own CExtResourceManager-derived class which returns your custom list separator, but this will change the list separators in other Prof-UIS component like the grid cell which displays RGB colors. If this solution is acceptable for you, then you should code your CExtResourceManager-derived class which overrides the CExtResourceManager::GetLocaleInfo() virtual method and returns a custom list separator if the LCType parameter is set to LOCALE_SLIST value.