Re-enabling Direct Editing Mode [message #849950] |
Thu, 19 April 2012 15:55 |
Craig Petre Messages: 32 Registered: April 2011 |
Member |
|
|
Hey, so I followed the tutorial for adding a DirectEditingFeature and it works fine. I add the pictogram element which can be direct edited and I'm able to edit the name, etc. I was wondering if there is an easy way to re-enable direct editing at some point after creation (like if the user double clicks on text, I'd like to enable direct editing again). I noticed there is a function in IFeatureProviderWithPatterns called "activateDirectEditingForPatterns". So what I did was create a ICustomFeature which calls, in its execute method, that function and I return the custom feature from the ToolBehaviorProvider "getDoubleClickFeature". So all of that works fine, I double click on the pictogram element I want to re-enable direct editing on and "activateDirectEditingForPatterns" is called and everything seems to be working as designed with one small problem, I need to move the pictogram element after calling "activateDirectEditingForPatterns" before the editable text box will show up and allow me to edit.. which I can of course get around by overriding the function and moving the PE after direct editing mode is enabled.. but that is definitely a hack.
Does the procedure described above sound like how one would go about doing this? Or am I missing some simpler method? Seems like "activateDirectEditingForPatterns" shouldn't require me to move or otherwise update the PE in order to get direct editing turned on right?
Thanks,
Craig
[Updated on: Thu, 19 April 2012 17:44] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03027 seconds