Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic the Name of shape in ShapeListBox (Read 1321 times)
dumingxin
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Aug 4th, 2012
the Name of shape in ShapeListBox
Aug 5th, 2012 at 3:05am
Print Post  
the name of shapes in ShapeListBox is in English,how can I translate it into Chinese,thanks  for your reply
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: the Name of shape in ShapeListBox
Reply #1 - Aug 6th, 2012 at 7:38am
Print Post  
Shapes have a DisplayName property that is shown by the ShapeListBox applet instead of Shape.Id if the former is set. If you load your shapes from a shape-library file, you could set the "display-name" attribute for each xml shape element in the file. If you need to change the display name of predefined shapes, you could do that from the AppletStartedScript:

Code
Select All
<ndiag:ShapeListBox ID="shapeList" runat="server" AppletStartedScript="onShapeListLoaded" />

function onShapeListLoaded()
{
	var applet = <%= shapeList.AppletElement %>;
	var scriptHelper = applet.getScriptHelper();
	scriptHelper.shapeFromId("Rectangle").setDisplayName("矩形");
	// ...
	applet.repaint();
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint