Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic move edit box below the node (Read 666 times)
KrzysztofM
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Nov 21st, 2023
move edit box below the node
Nov 21st, 2023 at 12:04pm
Print Post  
Hi team,

My requirement is to display text below the node shape, and managed to do that by editing the setTextArea code from following post:

However, when the node is double-clicked, edit box still appears on top of the node rectangle. Is there any way to move that to the position of text below?

Thanks a ton.
  
Back to top
 
IP Logged
 
KrzysztofM
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Nov 21st, 2023
Re: move edit box below the node
Reply #1 - Nov 21st, 2023 at 12:05pm
Print Post  
since it did not allow me to link in first post:
https://mindfusion.eu/Forum/YaBB.pl?num=1425413369/3#3
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3156
Joined: Oct 19th, 2005
Re: move edit box below the node
Reply #2 - Nov 22nd, 2023 at 10:00am
Print Post  
Hi,

You could move the JTextArea from enterInplaceEditMode event handler -

Code
Select All
void enterInplaceEditMode(InPlaceEditEvent e)
{
	JTextArea textCtrl = (JTextArea)e.getEditControl();
	textCtrl.setLocation(
		textCtrl.getLocation().x,
		textCtrl.getLocation().y + textCtrl.getSize().height);
} 



If you are using a recent version of the control, currently we'd recommend adding NodeLabels to show texts outside the node -

Code
Select All
NodeLabel lb2 = node.addLabel("label 2");
lb2.setEdgePosition(2 /*bottom edge */, 0, 2 /*offset*/);
lb2.setHorizontalAlign(Align.Center);
lb2.setVerticalAlign(Align.Near); 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
KrzysztofM
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Nov 21st, 2023
Re: move edit box below the node
Reply #3 - Nov 24th, 2023 at 11:55am
Print Post  
Hi Slavcho,

We are too invested in using Text values, but will look into labels for our next planning. Regardless, InplaceEditMode method works great for us - thanks for that!

BR
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint