We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Localisation of Palette Name

Thread ID:

Created:

Updated:

Platform:

Replies:

51625 Nov 9,2006 11:57 AM Nov 15,2006 05:57 PM Windows Forms 1
loading
Tags: Diagram
Richard Deverson
Asked On November 9, 2006 11:57 AM

We are (still) using Syncfusion Diagram.Windows v. 3.302.0.0 on Windows XP SP2

In our Windows .NET GUI application we have create a Syncfusion PaletteGroupBar object.
On application startup we are adding seven symbol palettes to this PaletteGroupBar using LoadPalette() method.

After this we want to localize this palette name, to be able to run our software in foreign languages, too.
For this purpose we added all palette names in our (localizable) string resources table and translate the hard-coded palette names from the .edp files from these resources.

Unfortunately Syncfusion Diagram.Windows v. 3.302.0.0 has only a GetPalette() method, but nothing like SetPalette() or SetPaletteName()
So we can programmatically change the palette name, but this modification can never be seen on the screen.

We also tried the following:
As the method LoadPalette() returns an object of class GroupBarView we tried the following piece of code:

// Load palettes from files
paletteGroupViews[paletteNr] = this.symbolPaletteGroupBar.LoadPalette(Application.StartupPath + @"\Tools\DisplayEditorSymbolPalettes\" + paletteFileNames[paletteNr]);

// Try to replace palette name from symbol library by localized string resource
SymbolPalette palette = symbolPaletteGroupBar.GetPalette(paletteNr);
string paletteName = palette.Name.Replace(" ", "");
string localizedPaletteName = gdeRM.GetString("PaletteName_" + paletteName);
if (localizedPaletteName != null && localizedPaletteName != "" && localizedPaletteName != palette.Name)
{
paletteGroupViews[paletteNr].Palette.Name = localizedPaletteName;
paletteGroupViews[paletteNr].Palette.UpdateViews();
paletteGroupViews[paletteNr].Invalidate();
// PROBLEM: Unfortunately this modified palette name is NOT refreshed on the screen. Syncfusion or Windows.Forms problem ?? (ChF 2006-11-02)
}

As you can see from the code, unfortunately without success either ...

(Sorry about the ugliness of the code snippet, copy/paste didn't work so well.)

So here are our questions:
1) Do you have a solution for this problem for Syncfusion Diagram.Windows v. 3.302.0.0 ?
2) Has there some functionality been added for being able to update a palette name in newer Syncfusion Diagram versions ?

J.Nagarajan [Syncfusion]
Replied On November 15, 2006 05:57 PM

Hi Richard,

Sorry for the delay in getting back to you. If your intention is to programmatically change the Palette's name then please refer to the following code snippet.

//Load Palette from files
paletteGroupViews[paletteNr] = this.symbolPaletteGroupBar.LoadPalette(Application.StartupPath + @"\Tools\DisplayEditorSymbolPalettes\" + paletteFileNames[paletteNr]);

// Try to replace palette name from symbol library by localized string resource
SymbolPalette palette = symbolPaletteGroupBar.GetPalette(paletteNr);
string paletteName = palette.Name.Replace(" ", "");
string localizedPaletteName = gdeRM.GetString("PaletteName_" + paletteName);
if (localizedPaletteName != null && localizedPaletteName != "" && localizedPaletteName != palette.Name)
{
this.symbolPaletteGroupBar.GroupBarItems[paletteNr].Text= localizedPaletteName;
}

I hope this will meet your requirement. Please let me know if you have any questions.

Thanks for using syncfusion product.

Regards,
Nagaraj

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;