Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Programmatically enable in-place edit (Read 4090 times)
koosala
Full Member
***
Offline


Java Happens

Posts: 136
Joined: May 13th, 2007
Programmatically enable in-place edit
Jul 4th, 2007 at 3:15am
Print Post  
Is it possible to programmatically enable in-place edit? Double clicking opens up the text box for edit. I would like that to open when user clicks a button.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Programmatically enable in-place edit
Reply #1 - Jul 4th, 2007 at 6:54am
Print Post  
Yes, you could call FlowChart.startInplaceEdit(someBox).

Stoyan
  
Back to top
 
IP Logged
 
koosala
Full Member
***
Offline


Java Happens

Posts: 136
Joined: May 13th, 2007
Re: Programmatically enable in-place edit
Reply #2 - Jul 5th, 2007 at 2:04am
Print Post  
Hi Stoyan,

Thanks, that worked. It wasn't documented in 1.0 Developer's guide though - an addition in the 1.01 version?

In addition, is there some way I can get a reference to the text box used for inplace edit? For example, when I want to programatically enable edit, I would like to have the whole text selected. Also, when the text box is in focus, the canvas stops picking up events like key type etc.

Thanks,
Praveen
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Programmatically enable in-place edit
Reply #3 - Jul 5th, 2007 at 5:48am
Print Post  
Hi Praveen,

You could iterate over the Flowchart child controls and check which one is an instanceof JTextArea - that should be the text box used for in-place edit.

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Programmatically enable in-place edit
Reply #4 - Jul 5th, 2007 at 5:48am
Print Post  
... or we might add a public getter for the "private JTextArea inplaceTextArea" field.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint