Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic text input (Read 1807 times)
Bill
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Mar 31st, 2016
text input
Mar 31st, 2016 at 10:16pm
Print Post  
I am trying to find a way to allow users to enter a value in one of the tablenode cells. Can this be done?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: text input
Reply #1 - Apr 1st, 2016 at 9:12am
Print Post  
Hi Bill,

Enable in-place edit mode and users will be able to enter text by double-clicking a cell -

Code
Select All
diagram.setAllowInplaceEdit(true); 



If you need to enter edit mode from a different event handler, and only for specific cell, you could use the beginEdit method and undocumented CellEditor class -

Code
Select All
// eg. in nodeClicked event handler
var table = args.getNode();
table.getObjectToEdit = function ()
{
	var cell = table.getCell(0, 0);
	return new MindFusion.Diagramming.CellEditor(table,
	{
		cell: cell,
		cellRect: cell.text.bounds,
		column: 0,
		row: 0
	});
}
diagram.beginEdit(table); 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint